chart = {
const svg = d3.create("svg")
.attr("viewBox", [-width / 2, -height / 2, width, height])
.attr("stroke-linejoin", "round")
.attr("stroke-linecap", "round");
const g = svg.selectAll("g")
.data(myData)
.join("g")
.attr("fill", d => color(d.party));
g.selectAll("path")
.data((d, i) => d3.range(
yTickSpacing, d.value + 1, yTickSpacing
).map(value => ({ value: value, pos: i })))
.join("path")
.attr("fill-opacity", d => d.value / yMaxTick)
.attr("d", d => d3.arc()
.innerRadius(y(d.value-yTickSpacing))
.outerRadius(y(d.value))
.startAngle(x(d.pos))
.endAngle(x(d.pos+1))(d));
svg.append("g")
.call(xAxis);
svg.append("g")
.call(yAxis);
return svg.node();
}