Import svg
Import with d3.xml, appendChild to a group element, change the attributes from D3
JavaScript
var dataset = [ 5, 10, 13, 19];
//Width and height
var w = 1000;
var h = 300;
//Create SVG Element
var svg = d3.select("body")
.append("svg")
.attr("width", w)
.attr("height", h);
//Import the plane
d3.xml("https://image.flaticon.com/icons/svg/84/84971.svg", "image/svg+xml", function(xml) {
var importedNode = document.importNode(xml.documentElement, true);
svg.selectAll("g")
.append("g")
.enter()
.data(dataset)
.attr("height", 10)
.attr("width", 10)
.attr("y", 0)
.attr("x", function(d,i) {
return i * 70;
})
.each(function(d, i){
var plane = this.appendChild(importedNode.cloneNode(true));
d3.select(plane).select("path").attr("fill", "#00B9FA");
});
});