length_chart = {
const svg = d3.create("svg").attr("viewBox", [0, 0, width, height]);
svg.append("g").call(xAxis);
svg.append("g").call(yAxis);
svg.append('text', 'label');
svg
.append("text")
.attr("x", width / 2)
.attr("y", height)
.text("Month")
.style("font-size", "15px");
svg
.append("text")
.attr("transform", "translate(10, 300) rotate(-90)")
.text("Temperature")
.style("font-size", "15px");
svg
.append("text")
.attr("x", width / 3)
.attr("y", 15)
.attr("text-anchor", "middle")
.text("Seattle Rain by Month")
.style("font-size", "18px");
svg
.selectAll('.rect')
.data(data_array)
.join(enter => enter.append("rect"))
.attr("x", d => x_scale(d.x))
.attr("y", d => y_scale(d.y))
.attr("transform", "translate(10, -margin.bottom)")
.attr('width', 3)
.attr("height", d => y_scale(0) - y_scale(d.y) - 235)
.attr('fill', "yellow")
.attr("stroke-width", "0.5px")
.attr("stroke", "blue");
return svg.node();
}