chart = {
const svg = d3.create("svg")
.attr("viewBox", [-14, 0, width + 28, height])
.style("display", "block")
.style("margin", "0 -14px")
.style("background", mode === "dark" ? "#1b1e23" : "none")
.style("color", mode === "dark" ? "#fff" : "#1b1e23");
svg.append("g")
.attr("fill", mode === "dark" ? "lightsteelblue" : "steelblue")
.selectAll("rect")
.data(data)
.join("rect")
.attr("x", (d, i) => x(i))
.attr("y", d => y(d.value))
.attr("height", d => y(0) - y(d.value))
.attr("width", x.bandwidth());
svg.append("g")
.call(xAxis);
svg.append("g")
.call(yAxis);
return svg.node();
}