chart = {
const root = tree(d3.hierarchy(data))
const svg = d3.create("svg")
.style("background-color", "#132031");;
svg.append("g")
.attr("fill", "none")
.attr("stroke", '#999')
.attr("stroke-opacity", 0.4)
.attr("stroke-width", 1.5)
.selectAll("path")
.data(root.links())
.join("path")
.attr("d", d3.linkRadial()
.angle(d => d.x)
.radius(d => d.y))
.attr("stroke", (d, i) => d.source.data.children[0].color);
svg.append("g")
.selectAll("circle")
.data(root.descendants())
.join("circle")
.attr("transform", d => `
rotate(${d.x * 180 / Math.PI - 90})
translate(${d.y},0)
`)
.attr("stroke", '#fff')
.attr("fill", d => d.data.color ? d.data.color : '#fff')
.attr("opacity", '0.6')
.attr("r", d => d.data.children.length ? d.data.children.length * 1.2 : 2);
return svg.attr("viewBox", autoBox).node();
}