chart = {
const svg = d3
.create("svg")
.attr("viewBox", [-width / 2, -height / 2, width, height])
.attr("stroke-linejoin", "round")
.attr("stroke-linecap", "round");
svg
.append("path")
.attr("fill", "lightsteelblue")
.attr("fill-opacity", 0.2)
.attr(
"d",
area.innerRadius((d) => y(d.hsMin)).outerRadius((d) => y(d.maxMax))(data)
);
svg
.append("path")
.attr("fill", "steelblue")
.attr("fill-opacity", 0.2)
.attr(
"d",
area.innerRadius((d) => y(d.hsMin)).outerRadius((d) => y(d.hsMax))(data)
);
svg
.append("path")
.attr("fill", "none")
.attr("stroke", "steelblue")
.attr("stroke-width", 1.5)
.attr(
"d",
line.radius((d) => {
return y(d.hsMean);
})(data)
);
return svg.node();
}