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