chart = {
const svg = d3
.create("svg")
.attr("viewBox", [0, 0, width, height])
.style("overflow", "visible");
svg
.selectAll("circle")
.data(data)
.join("circle")
.attr("cx", (d) => x(d[0]))
.attr("cy", (d) => y(d[1]))
.attr("r", (d) => r(d[1]))
.attr("fill", (d) => c(d[1]));
svg
.selectAll("text")
.data(data)
.join("text")
.filter((d) => d[1] > 90)
.text((d) => d[0] + " | " + d[1])
.attr("x", (d) => x(d[0]))
.attr("y", (d) => y(d[1]))
.style("text-anchor", "middle");
return svg.node();
}