简体   繁体   English

没有范围的默认Highstock缩放选择器按钮

[英]Default highstock zoom without rangeSelector buttons

Is there a way to set the default zoom on highstocks without having the selector buttons. 有没有一种方法可以在没有选择器按钮的情况下对高库存设置默认缩放。 I have limited space, and dont want to use the default date ranges. 我的空间有限,并且不想使用默认的日期范围。 instead I prefer to use the slider under the graph But when I disable the rangeSelector, it defaults to using the whole range, rather than in my case, the last 24 hours. 相反,我更喜欢使用图形下方的滑块,但是当我禁用rangeSelector时,默认情况下将使用整个范围,而不是我最近的24小时。 I can get it to work by having only one button on the selector, but then its taking up space which could be used for the graph. 我可以通过只在选择器上只有一个按钮来使它工作,然后再占用它可以用于图形的空间。

Any ideas on what I can do? 关于我能做什么的任何想法?

Thanks 谢谢

You can use the xAxis min and max option to get what you want. 您可以使用xAxis的min和max选项来获取所需的内容。 Disable the range selector and add the option to xAxis. 禁用范围选择器,并将选项添加到xAxis。

Check the jsfiddle http://jsfiddle.net/4txudb31/1/ 检查jsfiddle http://jsfiddle.net/4txudb31/1/

    xAxis: {
        ordinal: false,
         min: fromtimestamp,
         max: totimestamp
    },

    rangeSelector: {
        enabled: false
    },

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM