dmca dmca - 1 year ago 116
R Question

How do I adjust the initial range in hc_navigator

I am using the highcharter package (which is awesome) to plot time series data in R and have added a navigation to my chart using the following function:


I want to pass in an argument that specifies the initial focus of the range of the navigator.

This is an example of what I am trying to accomplish:

Notice that navigator range defaults to 3 months, rather than the entire series.

I looked through the documentation and I couldn't find a way to do this.

Answer Source

First, is not the hc_navigator.

You need to search about highstock set default zoom in google which lead you to this highcharts question/answer Highstocks - How to change the default Zoom. You need to use rangeSelector options.

So in highcharter: hc_rangeSelector(selected = 2).

Hope this helps you.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download