chart = {
const svg = d3.create("svg").attr("viewBox", [0, 0, width, height]);
svg
.append("g")
.selectAll("path")
.data(series)
.join("path")
.attr("fill", ({ key }) => color(key))
.attr("d", area)
.append("title")
.text(({ key }) => key);
svg.append("g").call(xAxis);
svg.append("g").call(yAxis);
svg
.append('text')
.text('Hurricanes Harvey,')
.style('font-size', '15px')
.attr('x', `${x(dateParse('9/20/17'))}px`)
.attr('y', `260px`);
svg
.append('text')
.text('Irma and Maria')
.style('font-size', '15px')
.attr('x', `${x(dateParse('9/20/17'))}px`)
.attr('y', `280px`);
svg
.append('text')
.style('text-anchor', 'end')
.text('COVID-19')
.style('font-size', '15px')
.attr('x', `${x(dateParse('3/13/20')) - 2}px`)
.attr('y', `120px`);
svg
.append('text')
.style('text-anchor', 'end')
.text('emergency declared')
.style('font-size', '15px')
.attr('x', `${x(dateParse('3/13/20')) - 2}px`)
.attr('y', `140px`);
return svg.node();
}