chart = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, maxWidth, height])
.attr("width", maxWidth)
.attr("height", height)
.style("overflow", "visible")
.style("font-family", "sans-serif")
.style("margin", "10px 0px");
svg.append("g").attr("class", "lines");
svg.append("g").attr("class", "labels").style("pointer-events", "none");
const dot = svg.append("g")
.attr("display", "none")
.style("pointer-events", "none")
.attr("id", "dot");
dot.append("circle")
.attr("r", 3.5);
dot.append("text")
.style("font", "10px sans-serif")
.attr("text-anchor", "middle")
.style("pointer-events", "none")
.attr("y", -8);
svg.append("g").attr("class", "x--axis")
.attr("transform", `translate(0,${height - margin.bottom})`);
svg.append("text")
.attr("class", "x--axis--label")
.style("pointer-events", "none")
.text(xLabel)
.attr("text-anchor", "start")
.style("text-anchor", "end")
.attr("x", maxWidth - margin.right )
.attr("y", height+7 );
svg.append("g").attr("class", "y--axis")
.attr("transform", `translate(${margin.left},0)`);
svg.append("text")
.attr("class", "y--axis--label")
.style("pointer-events", "none")
.text(yLabel)
.attr("text-anchor", "start")
.style("text-anchor", "start")
.attr("x", 5 )
.attr("y", 10 );
svg.append("g")
.append("text")
.attr("transform", `translate(${margin.left+10}, ${margin.top+70})`)
.style("pointer-events", "none")
.attr("class", "daysPassed")
.style("font-size", "48pt")
.style("fill", "#333")
.style("opacity", 0.3)
.text("");
const resEle = html`
<style>* { font-family: sans-serif }</style>
<br>
${header}
${viewof animDate} ${viewof focusName} ${viewof useLinearScale}
${svg.node()}
<div>${footer}
<br>
<a href="https://johnguerra.co">John Alexis Guerra Gómez</a> <a href="https://twitter.com/duto_guerra"> @duto_guerra</a> <a href="https://twitter.com/guerravis"> @guerravis</a>
<br>
<a href="https://johnguerra.co/coronavirus">https://johnguerra.co/coronavirus</a>
<br>
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>
</div>
`;
return resEle;
}