0

On this official Highcharts demo https://www.highcharts.com/demo/gantt/with-navigation the display starts at the end enter image description here

What do I need to change, so the navigation range starts at the beginning like so? enter image description here

giorgio79
  • 3,787
  • 9
  • 53
  • 85

1 Answers1

1

You can use setExtremes method in load event:

    chart: {
        events: {
            load: function() {
                const xAxis = this.xAxis[0];
                xAxis.setExtremes(xAxis.dataMin, xAxis.dataMin + xAxis.max - xAxis.min);
            }
        }
    }

Live demo: https://jsfiddle.net/BlackLabel/8tk52zdw/

API Reference: https://api.highcharts.com/class-reference/Highcharts.Axis#setExtremes

ppotaczek
  • 36,341
  • 2
  • 14
  • 24