Highstock - 设置超出数据范围的极限 [英] Highstock - Set extremes beyond the data range
问题描述
我有一个数据在x轴范围[t1,t2]中的高位图,我想将轴极值设置为[t1,t3],比t3高出t2,导致这部分没有数据的图表。该图表没有导航器,也没有滚动条或范围选择器。
I have a highstock chart with data in the range [t1 , t2] in the x axis, and I want to set the axis extremes to [t1, t3], being t3 higher than t2, resulting this in a portion of the chart with no data. The chart has no navigator nor scrollbar nor range selector.
当我尝试这样做时...
When I try to do this ...
chart.xAxis[0].setExtremes(extremes.min, extremes.max + ((30 * 60 * 1000)));
...似乎highstock正在取代我提供的最大数据量,但如果我在调用setExtremes之后记录轴极值,它们就是我提供的那些,所以看起来图表内部选项和实际绘制的内容之间存在不一致。我做了一个小提琴演示( http://jsfiddle.net/tW9Te/ )。
... it seems like highstock is replacing the max I provide with the max of the data, but if I log the axis extremes after calling setExtremes, they are the ones I've provided, so it seems like there is an inconsistency between the chart internal options and what is actually being drawn. I made a fiddle showing this (http://jsfiddle.net/tW9Te/).
是否可以做我在说的内容?
Is it possible to do what I'm saying?
推荐答案
轴。设置 xAxis.ordinal = false
并按照你想要的方式工作,参见: http://jsfiddle.net/tW9Te/1/
It's caused by ordinal axis. Set xAxis.ordinal = false
and will work the way you want to, see: http://jsfiddle.net/tW9Te/1/
这篇关于Highstock - 设置超出数据范围的极限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!