Chartjs-Applying Callback To One Y-Axis

0👍

Instead of using label in options/tooltips/callbacks, use ticks in options/scales/y like this example.

So your code becomes:

options: {
        scales: {
            y: {
                ticks: {
                    // Customize your label here
                    callback: function(value, index, values) {
                        return value.toFixed(2);
                    }
                }
            }
        }
    }

Leave a comment