Unlisted
Edited
Dec 25
Insert cell
Insert cell
Insert cell
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%)"},),
]
})
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more