Plot.plot({
marks: [
Plot.barY(data, Plot.stackY({
x: "year",
y: "revenue",
z: "format",
fill: "format",
order: "appearance",
reverse: true,
})),
Plot.ruleY([0])
],
grid: true,
facet: {
data,
y: "group",
marginLeft: 70
},
fy: { label: null },
y: { axis: false },
x: { tickRotate: 90, tickFormat: d => d.getFullYear() },
marginBottom: 70,
width,
})