Schart = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height])
.attr("id", "chart")
svg.append("g")
.call(xAxis);
svg.append("g")
.call(yAxis);
svg.append("path")
.datum(data)
.attr("fill", "none")
.attr("stroke", "red")
.attr("stroke-width", 2)
.attr("stroke-linejoin", "round")
.attr("stroke-linecap", "round")
.attr("d", line);
svg.append("circle")
.attr("r",20)
.attr("cx",width - 50)
.attr("cy",50)
.attr("fill","lightgreen")
.style("cursor", "pointer")
.attr("id", "playButton")
.on("click", makeNoise)
svg.append("text")
.attr("x",width - 50)
.attr("y",52)
.style("font-size","12px")
.style("font-family","sans-serif")
.style("pointer-events","none")
.attr("text-anchor","middle")
.text("play")
svg.append("circle")
.attr("r",5)
.attr("stroke", "red")
.attr("cx",x(data[0].notification_date))
.attr("cy",y(data[0].mean_7day))
.attr("fill","none")
.attr("id", "playHead")
return svg.node();
}