Plot.plot({
x: {
label: null,
},
y: {
label: "Number of posts",
grid: 5,
},
marks: [
Plot.ruleY([0]),
Plot.axisX({
tickFormat: (d) => d.toString(),
tickRotate: -30,
}),
Plot.barY(data, {x: "year", y: "count", fill: (d) => d.year === 2024 ? "hsl(0 50% 50%)" : "hsl(0 30% 70%)"},),
]
})