Reputation: 37
Consider my following example case.
dataset = [[1,5],[2,6],[3,7],4,8],[5,9],[6,10]].
I made this graph scrollable on x-axis. When the graph is first loaded, I can see y values from x=1 to 4 by scrolling. The next step is I want to set min and max x-ranges by
setExtreme()
method.
I want to set x-axis min value 2 and max value 5. The graph range for x-axis should be 2-3. But the graph should be able to scroll to see value of x=1 and also when x=10. Is this possible? I am new to highcharts. Thanks in advance.
Upvotes: 0
Views: 729
Reputation: 11633
I think that you can achieve your requirement by defining the xAxis.min
and xAxis.max
values.
Demo: https://jsfiddle.net/BlackLabel/2wjztbom/
xAxis: {
min: 2,
max: 4,
scrollbar: {
enabled: true
},
},
Be aware that scrollbar feature is available only for the Highcharts Stock module, not for basic Highcharts - https://www.highcharts.com/docs/chart-concepts/scrollbar
Upvotes: 1