Disable Element like RangeSelector Dynamically
It can be interesting to disable Element like RangeSelector dynamically. Like when you export a chart. We can do something like:
chart.options.rangeSelector.enabled=false;
chart.update();
There is a method to hide element:
http://jsfiddle.net/dJbZT/99/
That I found on stackOverflow (http://stackoverflow.com/questions/25802472/how-to-hide-show-scrollbar-and-range-selector-of-highcharts-on-button-click)
But this is not very good, because the Element are hidden but if you hide the the navigator and you have a legend, the legend won't move for example
![](https://secure.gravatar.com/avatar/8e31a48fe3002e564c4e84d4e743b483?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
Every option in chart can now be dynamically updated via `chart.update(newOptions)` API.
-
Geoffrey commented
I know about it, but this is not only for export.
Thank you for your answer anyway =) -
If you only want it to be hidden for exported charts, you can add it to exporting.chartOptions:
exporting: {
chartOptions: {
rangeSelector: {
enabled: false
}
}
}