bladderPlot = Plot.plot({
width,
marginTop: 20,
y: { domain: [0, 0.7], grid: true, label: null },
marks: [
Plot.rectY(bladderData, {
x: "date",
y: "qtr_rate_of_rcd_wt_AAdrug",
interval: "quarter",
fill: "orange",
title: (d) => d.date
}),
Plot.ruleX(
bladderDates.map((d) => d.date),
{}
),
Plot.text(bladderDates, {
x: (d) => d.date,
y: 0.7,
dy: -10,
text: (d) => d.label
}),
Plot.ruleY([0])
]
})