chart = {
const svg = d3.create("svg")
.attr("viewBox",[0, 0, width, height]);
svg.append('g').call(xAxis)
svg.append('g').call(yAxis)
svg.append('path')
.datum(series)
.attr('d', line)
.style('stroke', (d, i) => colors(d[i].topic))
.style('fill', 'transparent');
return svg.node();
}