chart = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height])
const g = svg.append("g")
.attr("fill", "steelblue")
.selectAll("rect")
.data(data)
.join("rect")
.attr("x", d => x(d.area))
.attr("y", d => y(d.count))
.attr("height", d => y(0) - y(d.count))
.attr("width", x.bandwidth());
svg.append("g").call(xAxis)
svg.append("g").call(yAxis)
svg.selectAll(".tick").attr("font-size", "8px")
svg.append("text")
.attr("x", (width/2))
.attr("y", margin.top)
.attr("text-anchor", "middle")
.attr("font-size", "24px")
.attr("font-family", "sans-serif")
.text("Simple Assault Crime Reports by LAPD Area, 2017")
svg.append("text")
.attr("x", (width/2))
.attr("y", height - margin.bottom/3)
.attr("text-anchor", "middle")
.attr("font-size", "16px")
.attr("font-family", "sans-serif")
.text("Neighborhoods")
svg.append("text")
.attr("transform", "rotate(-90)")
.attr("x", -(height/2))
.attr("y", margin.left-40)
.attr("text-anchor", "middle")
.attr("font-size", "16px")
.attr("font-family", "sans-serif")
.text("Number of Incidents")
return svg.node()
}