Chart.js Add Thousands Comma Separator to Axes Tick Value

March 21, 2020
// const nf = Intl.NumberFormat()

new Chart(ctx, {
  options: {
    scales: {
      scales: {
        yAxes: [
          {
            ticks: {
              userCallback(value, index, values) {
                // return nf.format(value)
                return value.toLocaleString()
              }
            }
          }
        ]
      }
    }
  }
})

NOTE: Refer JavaScript Format Number With Thousands Comma Separator

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.