chart = {
console.log(m);
const root = pack();
const svg = d3.select(DOM.svg(width, height));
if (grouped) svg.append("g")
.attr("fill", "none")
.attr("stroke", "#ccc")
.selectAll("circle")
.data(root.descendants().filter(d => d.height === 1))
.join("circle")
.attr("cx", d => d.x)
.attr("cy", d => d.y)
.attr("r", d => d.r);
svg.append("g")
.selectAll("circle")
.data(root.leaves())
.join("circle")
.attr("cx", d => d.x)
.attr("cy", d => d.y)
.attr("r", d => d.r)
.attr("fill", "#0000ff");
return svg.node();
}