chart = Plot.plot({
height: 500,
color: {
scheme: "orrd",
type: "log"
},
y: {
type: "linear",
tickFormat: "~s",
label: "Concentration ↑"
},
marks: [
Plot.rect(
selected.filter((d) => d.value <= valueLowerThan),
Plot.bin(
{ fill: "count" },
{ x: "date", y: "value", thresholds: gridResolution }
)
)
]
})