I'm creating a Highstock chart that is supposed to show only some portion of available data at the beginning. I want the navigator extremes to be set to some default values that I provide, and load the rest of the data in asynchronous way when user shifts/stretches the navigator. Sadly, the way I believe it should work does not. This is what I do (chart Options):
var options = {
title: {
text: 'Analysis Graph'
},
scrollbar: {
liveRedraw: false
},
yAxis: yAxises,
series: series,
useHighStocks: true,
options: {
navigator: {
enabled:true,
xAxis: {
ordinal: false,
min: scope.dates.start,
max: scope.dates.end
}
},
rangeSelector: {
enabled: true
}
}
}
As you can see, I'm passing an xAxis object to the options/navigator with min and max dates (that are timestamps). It does not work as intended - the navigator's extremes are being set to the beginning and ending of the data series anyway. I checked, and the variables that I use for dates are correctly set and should work without problems.
Is there any alternate way to accomplish my goal or to make this way work?
EDIT:
Curiously enough, giving xAxis.min and .max works in highcharts-ng, but does not work in a solution where I create my own directive.
Here is how it looks:
The upper one is my normal solution, the lower is highcharts-ng powered one. highchart-ng one works as intended. Both have the same options with the same data:
var options = {
title: {
text: 'Analysis Graph'
}
yAxis: yAxises,
xAxis : {
},
series: series,
useHighStocks: true,
options: {
navigator: {
xAxis: {
min: scope.dates.start,
max: scope.dates.end
},
enabled:true
},
rangeSelector: {
enabled: true,
selected: 2
}
}
}
Does anyone know why this happens? It seems both solutions use highstock in version 4.2.5 . I'd like to NOT use highcharts-ng, so if anyone has an idea on how to make it work without using it, please contribute.