chart = {
const svg = d3.create('svg')
.attr('viewBox', [-width/2, -height/2-20, width, height]);
const g = svg.selectAll('g')
.data(outerPieData)
.join('g')
.attr('class', (d) => `family-${d.data.family}`)
.attr('fill', (d) => color(d.data.family));
g.selectAll('path')
.data((d) => d3.pie()
.value(d => d.share)
.startAngle(d.startAngle)
.endAngle(d.endAngle - padAngle)
(d.data.parties))
.join('path')
.attr('d', arc)
.attr('stroke', 'white')
.style('stroke-width', 1);
return svg.node();
}