如何启用 Highcharts 滚动条?
我尝试这样做
scrollbar: {
enabled: true
}
但没有成功。
我尝试使用 highstocks 附带的 highcharts.js ..但这也不起作用。 我做错了什么吗?
I tried doing the
scrollbar: {
enabled: true
}
But it didnt work.
I tried using the highcharts.js that comes with highstocks.. that did not work either.
Am I doing something wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您的代码仍然不起作用,您可以尝试更改此:
使用此:
并且您可以添加此:
最后,您可以添加此以指定一次要查看的数据点数量,例如“min:6”:
If your code still doesn't work, you could try changing this :
with this :
and you can add this :
finally, you can add this for how many data points you want to view at a time, example " min: 6 " :
此处已经回答了类似的问题。
你可以参考这个:如何在highcharts中启用滚动条
A similar question has already been answer here.
You can refer to this: How to enable scrollbars in highcharts
在回答这个问题时,可以通过 highstock js 添加滚动条。
我成功地为我的柱形图实现了一个优雅而简单的滚动条解决方案,仅使用 highcharts js,而不使用 highstock,如下所示:
其中 $period_interval_categories 在我的图表中表示 x 轴上的周期,由天、周、月等组成。
At the time of this answer, scrollbar can be added via highstock js.
I managed to implement an elegant and simple scrollbar solution to my column chart, using only highcharts js, without highstock, as follows:
where $period_interval_categories represents in my chart the period on x axis consisting of days, weeks, months, etc.