[Chartjs]-How to use percentage scale with Chart.js

60👍

Scale title configuration is a header if you scroll down in the documentation.

Here is a simple bar chart example, using scaleLabel which is sligtly modified to illustrate a percentage.

https://jsfiddle.net/r71no58a/4/

scales: {
   yAxes: [{
       ticks: {
           min: 0,
           max: 100,
           callback: function(value) {
               return value + "%"
           }
       },
       scaleLabel: {
           display: true,
           labelString: "Percentage"
       }
   }]
}

Leave a comment