[Chartjs]-Chart JS Y-axis labeling

2👍

scales: {
    yAxes: [{
        ticks: {
            callback: function (tickValue, index, ticks) {
                return Number(tickValue)
                    .toFixed(2);
            }
        }
    }]
}

This callback function is the solution.

enter image description here

2👍

Change this

yAxes: [{
    ticks: {
       precision: 2
    }
}],

Leave a comment