chart = {
const svg = d3.select(DOM.svg(width, height))
const g = svg
.attr("viewBox", [0, 0, width - (margin * 2), height - (margin * 2)])
const d = svg.selectAll("g")
.data(nodes.leaves())
.join("g")
.attr("transform", d => { return `translate(${d.x0},${d.y0})`})
d.append("rect")
.attr("id", (d) => d.data.brand)
.attr("fill", d => { while (d.depth > 1) d = d.parent; return color(d.data.brand); })
.attr("fill-opacity", 0.6)
.attr("width", d => d.x1 - d.x0)
.attr("height", d => d.y1 - d.y0);
d.append("text")
.attr("x", 2)
.attr("y", 10)
.style("font-size", 5)
.text(d => d.data.brand);
return svg.node();
}