chart = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height])
.attr("width", width)
.attr("height", height);
var line = d3.line()
.x(function(d) { return xScale(new Date(d.date)); })
.y(function(d) { return yScale(d.value); });
forcasts.forEach((d,i) => {
svg.append('path').datum([].concat([result[i]], d.forcast))
.attr('d', line)
.attr('fill', 'none')
.attr('stroke', '#999');
});
svg.append('path').datum(result)
.attr('d', line)
.attr('fill', 'none')
.attr('stroke', 'black')
.attr('stroke-width', 2);
return svg.node();
}