chart = {
const svg = d3.create("svg")
.attr("width", width)
.attr("height", height)
const zx = x.copy();
const zy = y.copy();
const merged = d3.merge(slice)
const line = d3.line()
.x(d => zx(d.about))
.y(d => zy(d.ma));
var path = svg.append("g")
.attr("fill", "none")
.attr("stroke", "#ddd")
.attr("stroke-width", 1)
.attr("stroke-linejoin", "round")
.attr("stroke-linecap", "round")
.selectAll("path")
.data(slice)
.join("path")
.attr("d", d => line(d));
var current = svg.append("path")
.attr("fill", "none")
.attr("stroke", "#52b1b1")
.attr("stroke-width", 1.5)
.attr("stroke-miterlimit", 1)
.attr("d", line(slice[slice.length-1]));
const gx = svg.append("g")
.call(xAxis, zx);
const gy = svg.append("g")
.call(yAxis, zy);
svg.append("text")
.attr("x", (width / 2))
.attr("y", 20)
.attr("text-anchor", "middle")
.style("font-size", "22px")
.style("font-weight", 700)
.text("The Florida COVID-19 Illusion");
svg.append("text")
.attr("x", margin.left + 4)
.attr("y", 38)
.style("font-size", "12px")
.text("Their new method of reporting covid-19 deaths makes it appear that the worst is always over.");
return Object.assign(svg.node(), {
update(slice) {
}
});
}