chart js more data than labels 1

chart js more data than labels

//Try adding the options.scales.xAxes.ticks.maxTicksLimit option:
xAxes: [{
    type: 'time',
    ticks: {
        autoSkip: true,
        maxTicksLimit: 20
    }
}]

Here is what the above code is Doing:
1. The type: ‘time’ option is telling Chart.js to use the time scale.
2. The ticks.autoSkip option is telling Chart.js to automatically skip some of the labels if there are too many.
3. The ticks.maxTicksLimit option is telling Chart.js to draw no more than 20 ticks.

Similar Posts