Chartjs-Hide labels and 0 values in chart.js?

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

Leave a comment