score:16

Accepted answer

it can be done using the maxtickslimit option of xaxes, see this working fiddle -> http://jsfiddle.net/lzo5g01n/3/

xaxes: [{
    type: 'time',
    ticks: {
        autoskip: true,
        maxtickslimit: 20
    }
}]

score:2

for chart.js 3.3.2, you can use @kunal khivensara's approach with a few changes. you can check the documentation. put ticks in xaxis in scales. example:

...
options: {
    scales: {
        xaxis: {
            ticks: {
                maxtickslimit: 10
            }
        }
    }
}
...

Related Query

More Query from same tag