chart = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height])
.attr("class", "color-black");
svg.append("g")
.style("font-size", "1rem")
.call(xAxis)
.append("text")
.attr("x", (width - yTickSize) / 2)
.attr("y", 40)
.attr("class", "xsmall-copy font-bold font-sans-serif")
.attr("fill", "currentColor")
.attr("text-anchor", "middle")
.text(`${xLabel}`);
svg.append("g")
.style("font-size", "1rem")
.call(yAxis);
svg.append("g")
.attr("class", "fill-red")
.selectAll("rect")
.data(data)
.join("rect")
.attr("x", d => x(d.name))
.attr("y", d => y(d.value))
.attr("height", d => y(0) - y(d.value))
.attr("width", x.bandwidth());
return svg.node();
}