Plot.plot({
width,
marginLeft: 70,
facet: { data, x: "year" },
fx: { tickFormat: (d) => ("" + d.getUTCFullYear()).slice(2) },
marks: [
Plot.barY(data, {
y: "revenue",
fill: "format",
order: [...colors.keys()],
reverse: true
})
],
color: chart1.scale("color")
})