Chartjs-Chart.js how to configure the lable for both axis

0👍

You are almost there, it’s almost the same as for the x axis so you will get:

xAxes: [{
     scaleLabel: {
         display: true,
         labelString: 'YEAR',
      }
 }],
 yAxes: [{
      scaleLabel: {
         display: true,
         labelString: 'Y label',
       }
  }]

0👍

Here is the simple yAxes. You need to add this.

yAxes: [{
  scaleLabel: {
    display: true,
    labelString: 'Label String',
  },
  {
    ticks: {
      min: 0,
      max: 1000,
      autoSkip: true,
      maxTicksLimit: 250,
      callback: function(value) {
        return value % 250 === 0 ? value + 'k' : null;
      }

    }
  }
}]

Moreover if you need 1000k as 1m you can write a function for that and use the function inside callback

Leave a comment