plot = Plot.plot({
x: { ticks: [] },
y: { grid: true },
fx: { type: "utc" },
color: { legend: true },
width,
marks: [
Plot.barY(data, {
x: (d) => `${d.category} - ${d.type}`,
y: "cnt",
fx: "date",
fill: (d) => `${d.category} - ${d.type}`,
tip: true
}),
Plot.ruleY([0])
]
})