{
const width = 400;
const height = 100;
const svg = d3
.create("svg")
.attr("width", width)
.attr("height", height)
.attr("viewBox", [0, 0, width, height]);
const barPadding = 1;
const rects = svg.append("g").selectAll("rect").data(dataset).join("rect");
rects
.attr("x", (d, i) => i * 50)
.attr("y", (d) => height - d)
.attr("width", 40)
.attr("height", (d) => d)
.attr("fill", "#8cc");
return svg.node();
}