Plot.plot({
width: width,
height: 600,
marginBottom: 60,
x: {tickRotate: 90, tickFormat: d3.format('d')},
y: { grid: true },
marks: [
Plot.barY(data, {
x: "decade",
y: "total",
fill: "#b22200", //
tip: true, // need to format year again
tip: {
format: {
x: (d) => `${d}`
}
}
//sort: {y: "x"}
}),
//Plot.ruleX([0])
]
})