chart = {
const arcs = pie(data);
const svg = d3.create("svg")
.attr("viewBox", [-width / 2, -height / 2, width, height])
.style("font", "10px sans-serif");
svg.selectAll("path")
.data(arcs)
.join("path")
.attr("d",arc)
.attr("fill", d => color(d.data.name));
return svg.node();
}