0👍
You can try
onAnimationComplete: function () {
var ctx = this.chart.ctx;
ctx.font = this.scale.font;
ctx.fillStyle = this.scale.textColor
ctx.textAlign = "center";
ctx.textBaseline = "bottom";
this.datasets.forEach(function (dataset) {
dataset.bars.forEach(function (bar) {
ctx.fillText(bar.value, bar.x, bar.y - 5);
});
})
}
used following link
- Chartjs-Chart.js chart appears and disappears on form submit
- Chartjs-How to make scrollable the legends of pie chart ( chart js )
-3👍
set “inGraphDataShow: true” in your code it will display all values on top of bar
- Chartjs-Is it possible to make 3D pie chart using chart.js?
- Chartjs-ChartJS 3.7.1 tooltip callback, get label value for the next index
Source:stackexchange.com