Plot.plot({
marginLeft: 80,
marginRight: 40,
style: { "font-size": "16px" },
y: {
label: null,
type: "band",
domain: ["first", "daily", "weekly", "monthly", "other"],
tickSize: 0,
},
x: { axis: null },
marks: [
Plot.barX(aggdata, {x: "pct", y: "bin", fill: "orange"}),
Plot.text(aggdata, {x: "pct", y: "bin", text: (d) => d3.format(".0%")(d.pct), dx: 5, textAnchor: "start"}),
Plot.tip(aggdata, Plot.pointer({
x: 0,
y: "bin",
title: d => d.description,
anchor: "left",
lineWidth: 5,
pointerSize: 16,
fontSize: 16,
}))
]
})