7👍
With Chart.js you can’t override the horizontal axis labels. Its a great library, sad it doesn’t support this.
The easiest way to do it, without getting into the Chart.js code and without redrawing the canvas, is to leave the label cell with an empty string.
For example, if you just want to show the x axis label every 10 points, you can do something like this when generating the labels:
if (ix % 10 == 0) {
labels[ix]="Label";
} else {
labels[ix]="";
}
- [Chartjs]-Chartjs datalabels change font and color of text displaying inside pie chart
- [Chartjs]-React chartjs 2 – Type 'string' is not assignable to type '"timeseries"'
Source:stackexchange.com