0👍
See https://www.chartjs.org/docs/latest/axes/labelling.html
basically, you set the ticks value. You use a ternary to decide when to show, e.g.
options: {
scales: {
y: {
ticks: {
// Only show if n'th
callback: function(value, index, ticks) {
return index%3 ? value : '';
}
}
}
}
}
- Chartjs-Chartjs 2 Line Graph Single Stroke Between Datasets
- Chartjs-Chart.js show date on X axis ticks, but only when day is different from previous tick
Source:stackexchange.com