如何防止Highstock隐藏数据行 [英] How to prevent Highstock from hiding data rows
本文介绍了如何防止Highstock隐藏数据行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个类型为 scatter
的Highstock图表。当我使用范围选择器时,系列中的某些消失会导致当前范围内没有数据。我怎样才能防止图表扩展到只有现有的数据,并保持yaxis在初始状态?
解决方案
我可以看到只有两种选择:
- 设置yAxis的最小和最大值
- 位于
setSetExtremes
在setTimeout函数中调用yAxis [0] .setExtremes(min,max)
,但是您需要自己计算最小值和最大值。
I have a Highstock chart with type scatter
. When I use the range selector some of the series disappear cause the have no data in the current range. How can I prevent the chart from scaling to only the existing data an keep the yaxis in the initial state?
解决方案
I can see only two options:
- set fixed min and max for yAxis
- in
afterSetExtremes
callyAxis[0].setExtremes(min, max)
in setTimeout function, but you need to calculate min and max on your own.
这篇关于如何防止Highstock隐藏数据行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文