chart = {
const svg = d3.select(DOM.svg(width, height));
svg.append("text")
.attr("x", margin.top)
.attr("y", margin.left)
.text("Monthly temperatures");
svg.append("g")
.append("path")
.datum(data[year - 1864].values)
.attr("fill", "none")
.attr("stroke", color(data[year - 1864].year))
.attr("stroke-width", 2.5)
.attr("stroke-linejoin", "round")
.attr("stroke-linecap", "round")
.attr("d", line);
svg.append("text")
.attr("x", x("jan"))
.attr("y", y(data[year - 1864].values[0].value) - 30)
.style("fill", color(data[year - 1864].year))
.text(year);
svg.append("g")
.call(xAxis);
svg.append("g")
.call(yAxis);
return svg.node();
}