chart = Plot.plot({
height: 300,
style: { fontSize: "14px" },
y: { label: null, grid: true, type: "linear", reverse: true },
x: { padding: 0.4, label: null },
marks: [
Plot.rectX(ratings, {
x: "Votes",
y: "Rating",
fill: "Rating",
inset: 1,
interval: 0.5
}),
Plot.frame({ stroke: "silver" })
]
})