I have a chart that I want to include in my website using Chart.js. In the Y-axis, it gives me real numbers instead of integers. How can I change the number to integers?
I handled it this way in new version:
new Chart(ctx, { type: 'bar', data: chartData, options: { scales: { yAxes: [{ ticks: { beginAtZero: true, callback: function(value) {if (value % 1 === 0) {return value;}} } }] } } });