plot = Plot.plot({
title: "XXXXXXXXX",
width,
y: {
inset: 5,
grid: true,
label: "%",
domain: [0,11],
},
x: {axis: null,
},
fx: {label: null, tickFormat: "d" },
color: {legend: true},
marks: [
Plot.barY(df, {
x: "Type",y: "Nombre", fill: "Type",
fx: "Année", ry1: 20, stroke: "black",
channels: {
type: {value: "Type", label: "Type:"},
p: {value: "Nombre", label: "Pourcentage:"}
},
tip: {format: {p: (d) => `${d} %` ,fx: false, y: false, x: false,fill: false,}, fontSize: 12}
}),
Plot.ruleY([0]),
]
})