Accepted answer

you can use setextremes event callback function and update tick interval based on min and max values.

    xaxis: {
        type: 'datetime',
        events: {
            setextremes: function(e) {
                const interval = (e.max - e.min) / 6;

                    tickinterval: interval
                }, false);

you can also consider using mintickinterval or tickpixelinterval.

live demo:

api reference:

Related Query

More Query from same tag