1👍
You can have the below function inside data labels to hide the Zero value:
options: {
plugins: {
datalabels: {
display: function(context) {
return context.dataset.data[context.dataIndex] !== 0; // or >= 1 or ...
}
}
}
}
See more on this issue here https://github.com/chartjs/chartjs-plugin-datalabels/issues/6
- Chartjs-JS Chart: do not merge duplicate x axis labels
- Chartjs-How to change chart.js grid, and axis color?
Source:stackexchange.com