line_chart2 = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height]);
svg.append("g")
.call(xAxis);
svg.append("g")
.call(yAxis);
svg.selectAll("path")
.data(line_data)
.join("path")
.attr("d", d => lineGenerator(d.values))
.attr("fill", "none")
.attr("stroke-width", "1px")
.attr("stroke", "blue")
.attr("opacity", 0.3)
svg.append("text")
.attr("x", width / 2)
.attr("y", height)
.text("Date")
.style("font-size", "20px")
svg.append("text")
.attr("transform", "translate(10, 300) rotate(-90)")
.text("Temperature")
.style("font-size", "20px")
svg.append("text")
.attr("x", width / 3)
.attr("y", 15)
.text("Daily Temperatures in Seattle in 2017")
.style("font-size", "20px")
return svg.node();
}