chart = {
const svg = d3.select(DOM.svg(width, height))
.attr("viewBox", `${-width / 2} ${-height / 2} ${width} ${height}`)
.style("width", "100%")
.style("height", "auto")
.style("font", "12px sans-serif");
svg
.selectAll('g')
.data(d3.stack().keys(data.columns.slice(2))(data))
.join("g")
.attr("fill", d => z(d.key))
.selectAll("path")
.data(d => d)
.join('path')
.attr('d', arc)
svg
.selectAll('text')
.data( data )
.join('text')
.text(d => d.Country)
.attr("x", 0)
.attr("y", 0)
.attr("dx", innerRadius + 10)
.attr("dy", 5)
.attr("transform", (d, i) => 'rotate(' + (degrees(x(d.Country) + x.bandwidth() / 2) - 90) + ')')
.attr("fill", "white")
svg.append("g")
.call(legend);
return svg.node();
}