chart = {
const svg = d3.select(DOM.svg(width, height));
svg
.attr("width", width + margin + margin)
.attr("height", height + margin + margin);
const g = svg
.append("g")
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
const color = d3.scaleOrdinal()
.domain(dataset)
.range(colors)
const pie = d3.pie().value((d) => d.value);
const arc = d3.arc().innerRadius(50).outerRadius(200);
const part = g
.selectAll(".part")
.data(pie(d3.entries(dataset)))
.enter()
.append("path")
.attr("d", arc)
.attr('fill', (d, i) => color(i))
g.selectAll(".part")
.data(pie(d3.entries(dataset)))
.enter()
.append("text")
.attr("transform", (d) => "translate(" + arc.centroid(d) + ")")
.text((d) => d.data.key)
.attr("fill", "white")
.attr("font-family", "sans-serif")
.attr("font-weight", "bold")
return svg.node();
}