Plot.plot({
marginLeft: 280,
marginRight: 20,
height: 250,
style: {
fontSize: "18px",
background: "transparent",
fontWeight: 400,
},
x: { axis: null },
y: { label: null },
marks: [
Plot.barX(funding, {
x: d3.max(funding, d => d.value),
y: "category",
fill: "#e5e5e5",
insetTop: 2,
insetBottom: 2
}),
Plot.barX(funding, {
x: "value",
y: "category",
sort: { y: "x", reverse: true },
fill: "#036eb0",
insetTop: 2,
insetBottom: 2
}),
Plot.text(funding, {
text: d => `${d.value}%`,
x: "value",
y: "category",
textAnchor: "end",
dx: -4,
fill: "white",
})
]
})