{
const dataset = [5, 25, 45, 65, 85];
const div = d3.create('div')
.style("background-color", "#aaa")
.style("padding", "5px")
.style("color", "white")
.style("font-weight", "bold")
.style("display", "flex")
.style("align-items", "flex-end")
div.selectAll("p")
.data(dataset)
.join("div")
.text(d => d)
.style("color", "white")
.style("text-align", "right")
.style("padding-right", "0.5em")
.style("background-color", (d) => d <= 30 ? "red" : "blue")
.style("margin", "5px")
.style("height", d => `${d * 10}px`)
.style("width", `${width / dataset.length}px`)
return div.node();
}