Plot.plot({
width: 800,
height: 500,
marginBottom: 40,
marginTop: 30,
x: { label: "value", tickSize: 0, type: "band" },
y: { label: "count", tickSize: 0, type: "band" },
marks: [Plot.barX(window.data.xValues, {
y: window.data.yValues,
fill: (d, i) =>
["steelblue", "orange", "green", "gray", "red"][i % ["steelblue", "orange", "green", "gray", "red"].length],
insetBottom: -6,
tip: {
format: {
y: true,
x: true,
fill: false,
},
},
})],
className: "horizontal-bar-plot",
});