Chartjs-Chart.js how to reduce labels for xAxes

0๐Ÿ‘

I think you should implement ticks.callback options in X axis.

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

In the callback you can implement the logic you need (as you described above).

Returning undefined or empty string from callback, the label is not drawn.

Leave a comment