0๐
I think this works.
this.data.datasets.forEach(function (dataset, i) {
var meta = chartInstance.controller.getDatasetMeta(i);
if (!meta.hidden) {
meta.data.forEach(function (bar, index) {
var data = dataset.data[index];
formatM(data);
ctx.fillText(data_M, bar._model.x, bar._model.y - 5);
});
}
});
- Chartjs-How to add label on chart.js on each point
- Chartjs-How to align labels at same side chartjs React
-1๐
i found the answer for this. just remove the animation, and used plugin datalabel chart js.
Source:stackexchange.com