Chartjs-How can i change tick val to title in ChartJS

0👍

You can override the tick callback, so you check the value of the tick and instead of returning that value you return the string of text you want to return

options: {
        scales: {
            yAxes: [{
                ticks: {
                    callback: function(value, index, values) {
                        return valueToString(value);
                    }
                }
            }]
        }
    }

Source: https://www.chartjs.org/docs/latest/axes/labelling.html#creating-custom-tick-formats

Leave a comment