React-chartjs-2: Thousand Separator

Created on 30 Jun 2018  路  1Comment  路  Source: reactchartjs/react-chartjs-2

How I add the thousand separator in the data label YAxes?

Most helpful comment

you can add your own formatting method in options for chart

const options = {
  scales: {
    yAxes: [{
      ticks: {
        callback(value) {
          // you can add your own method here (just an example)
          return Number(value).toLocaleString('en')
        }
      }
    }]
  }
}

<Line options={options} data={data} />

>All comments

you can add your own formatting method in options for chart

const options = {
  scales: {
    yAxes: [{
      ticks: {
        callback(value) {
          // you can add your own method here (just an example)
          return Number(value).toLocaleString('en')
        }
      }
    }]
  }
}

<Line options={options} data={data} />
Was this page helpful?
0 / 5 - 0 ratings

Related issues

justinmasse picture justinmasse  路  3Comments

pkellner picture pkellner  路  4Comments

flyingpath picture flyingpath  路  5Comments

souuu picture souuu  路  4Comments

nealoke picture nealoke  路  5Comments