chart = {
const svg = d3
.create("svg")
.attr("width", width)
.attr("height", height);
const g = svg
.append("g")
.attr(
"transform",
`translate(${width / 2}, ${height / 2 +
innerRadius}) rotate(180) scale(-1, 1)`
);
g.selectAll("path")
.data(data.map(d => d.value))
.join("path")
.attr("d", arc)
.attr("fill", (d, i) => color(i));
return svg.node();
}