{
const svg = d3.select(DOM.svg(width, height));
var node = svg.selectAll("g.node")
.data(data, function(d) { return d.id; })
var nodeEnter = node.enter()
.append("svg:g")
.attr("class", "node")
var defs = nodeEnter.append("defs");
defs.append('pattern')
.attr("id", function(d) { return "image"+ d.id;} )
.attr("width", 1)
.attr("height", 1)
.append("svg:image")
.attr("xlink:href", d => getUrl(d.id))
.attr("width", 100)
.attr("height", 100);
nodeEnter.append("svg:rect")
.attr("y", (d,i) => yScale(i))
.attr("x", 10)
.attr("width", 40)
.attr("height", 30)
.attr("fill", d => getColor(d.id) )
nodeEnter
.append("text")
.attr("x", 60)
.attr("y", (d,i) => yScale(i) + 15)
.attr("fill", d => getTextColor(d.id) )
.style("font", "12px Helvetica")
.text(d => d.id)
return svg.node();
}