chart = {
const svg = d3.create("svg")
.attr("width", width)
.attr("height", height)
.style("background-color", "#faf9f9")
const g = svg.append("g")
.attr("transform", `translate(${width/2}, ${height/2})`)
const pieChart = g.selectAll(".large-pie")
.data(arcs)
.join("path")
.classed("large-pie", true)
.attr("fill", 'none')
.attr("stroke", 'white')
.attr("stroke-width", 5)
.attr("stroke-opacity", 1)
.attr("d", d => arc(d))
.attr("id", (d, i) => `monthArc_${i}`)
const monthLabels = g.selectAll(".month-label")
.data(months)
.join("text")
.classed("month-label", true)
.attr("x", 31)
.attr("dy", -20)
.append("textPath")
.attr("xlink:href", (d, i) => `#monthArc_${i}`)
.text(d => d.name);
const smallPieChart = g.selectAll("small-pie")
.data(arcs)
.join("path")
.classed("small-pie", true)
.attr("fill", "white")
.attr("opacity", 1)
.attr("d", d => arcSmall(d))
const defs = svg.append("defs")
defs.append("filter")
.attr("id", "blur2")
.attr("width", "200%")
.attr("height", "200%")
.attr("x", "-60%")
.attr("y", "-60%")
.attr("color-interpolation-filters","sRGB")
.append("feGaussianBlur")
.attr("in","SourceGraphic")
.attr("stdDeviation","10")
const circlesG = g.selectAll("g")
.data(months)
.join("g")
.attr("transform", d => `translate(
${d3.pointRadial(x(d.name)+ x.bandwidth()/2, 230)[0]},
${d3.pointRadial(x(d.name) + x.bandwidth()/2, 230)[1]}
)`)
const circles = circlesG.selectAll('circle')
.data(d => circlesDataExtended[d.name])
.join("circle")
.attr('transform', (d,i) => `rotate(${180 * i})`)
.attr("r", 30)
.attr("cx", 14)
.style("mix-blend-mode", "multiply")
.style("fill", d => d)
.style("filter", "url(#blur2)")
const flowers = circlesG.selectAll('path')
.data(d3.range(8))
.join('path')
.attr('transform', (d,i) => "scale(0.3)rotate(" + (360/8 * i) + ")")
.style('stroke', '#fff')
.style('fill', 'none')
.style("stroke-width", 2)
.attr('d', petal)
return svg.node();
}