rangeSelector not setting by default
Before Submitting an issue please reproduce it in JSBin using this setup: http://qs.js.org/jsbin/react-highcharts?autostart
There is no need to reproduce. Go to the highstocks demo and notice that the rangeSelector wont have one selected until you click. It isn't just not selecting it visually but it ignores any input and defaults to index 1.
Is there any solution to solve this issue?
Would it be the same on just highcharts js?
I think my issue is the same as OhCirca's. Actually it do set the default to the button which you set in the config at first, but after the data loaded, the navigator in the bottom changed, then the default button lost it's style.
@kirjs I grabbed a demo from highcharts website
http://jsfiddle.net/gh/get/jquery/3.1.1/highslide-software/highcharts.com/tree/master/samples/stock/demo/candlestick-and-volume/
It sets the rangeSelector correctly. Could be related to demo's highcharts being out of date?
@JosephGu @OhCirca I don't think this is an issue with react-highcharts. Try setting the pre-selected range button index to a zoom button with a low zoom. In my case, the rangeSelector default selected zoom button config setting works if the zoom is not too zoomed (e.g. more than like 5 points of data, 5 candlesticks, etc show on chart).
However it suddenly stops working if the zoom is too much.
I apologize for the confusion I may have set with the OP. I was trying to say visually, through styles, 5)3 range selector does now show which selector is selected.
ahh ok. That too.
I'll update the demo to the latest version today, let's see if it's still there
Closing and there has been no activity in this issue for a while. if this is still relevant, please feel free to reopen
Found a solution based off of: https://github.com/whawker/react-jsx-highcharts/issues/201#issuecomment-458851074
Basically, instead of using rangeSelector.selected, you can use xAxis.range, like this:
xAxis: {range: 30 * 24 * 3600 * 1000 } // 1 month