Chartjs-How can I give the automatically generated y-axis values on bar charts in Chart.JS commas?

2👍

Using your hand-made addCommas function should do the trick :

options: {
    scales: {
        yAxes: [{
            ticks: {
                userCallback: function(item) {
                    return addCommas(item);
                },
            }
        }]
    }
}

Leave a comment