Chart.js: Row and column names for axis's

Created on 17 Jun 2016  路  3Comments  路  Source: chartjs/Chart.js

Can I give labels to the X and Y axis's by a bar or line chart like image below? I've searched in the documentation but nothing found that works.

image

I need to do that for show statistics for a big data site. The users will see how many users are registered by city, town or village.

I use the latest version of chart.js

Most helpful comment

Based on the documentation and a few examples, it should be feasible using the scale.scaleLabel.labelString option:

  options: {
    scales: {
      xAxes: [{
        scaleLabel: {
          labelString: 'Month'
        }
      }],
      yAxes: [{
        scaleLabel: {
          labelString: 'New Items'
        }
      }]
    }
  }

All 3 comments

I actually have the same question

Based on the documentation and a few examples, it should be feasible using the scale.scaleLabel.labelString option:

  options: {
    scales: {
      xAxes: [{
        scaleLabel: {
          labelString: 'Month'
        }
      }],
      yAxes: [{
        scaleLabel: {
          labelString: 'New Items'
        }
      }]
    }
  }

@simonbrunel is correct.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joebirkin picture joebirkin  路  3Comments

gabrieldesouza picture gabrieldesouza  路  3Comments

frlinw picture frlinw  路  3Comments

NODRAJ picture NODRAJ  路  3Comments

akashrajkn picture akashrajkn  路  3Comments