[![Barchart which requires barLabel to be added][1]][1]
[1]: https://i.sstatic.net/LhCRWshd.png
I wanted to add barLabel(i.e, values on the bars as marked in red on bars)
but I am not able to get values on the bars as we can see in image
I am currently using “@mui/x-charts”: “^7.2.0”
Please let me know
- Why is the barLabel not getting added on the bars
even if I have given barLabel to component?
2.(barLabel={“value”})Is this the only way to get values on bars
or are there any other ways to do this
<BarChart
margin={{ left: 120 }}
yAxis={[{ scaleType: "band", data: ['A', 'B', 'C', 'D'] }]}
series={[{ color: "rgba(4, 100, 88, 1)", data: [6, 8, 1, 8] }]}
layout="horizontal"
grid={{ vertical: true }}
disableLine={true}
barLabel={"value"}
{...chartSetting}
slotProps={{
bar: {
clipPath: `inset(0px round 0px 20px 20px 0px)`,
},
}}
/>