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", "pink")
.attr("stroke", "none")
.attr("d", line.radius(d => y(d.avg))(data));
return svg.node();
}