How to set ChartJS Y axis title?

emir picture emir · Aug 10, 2015 · Viewed 100.1k times · Source

I am using Chartjs for showing diagrams and I need to set title of y axis, but there are no information about it in documentation.

I need y axis to be set like on picture, or on top of y axis so someone could now what is that parameter

I have looked on official website but there was no information about it

Answer

andyhasit picture andyhasit · Apr 30, 2016

In Chart.js version 2.0 this is possible:

options = {
  scales: {
    yAxes: [{
      scaleLabel: {
        display: true,
        labelString: 'probability'
      }
    }]
  }
}

See axes labelling documentation for more details.