How do I adjust the initial range in hc_navigator

故事扮演 提交于 2019-12-13 06:16:36

问题


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

hc_navigator()

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:

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/stock/navigator/series-data/

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.


回答1:


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.



来源:https://stackoverflow.com/questions/39665958/how-do-i-adjust-the-initial-range-in-hc-navigator

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!