Highstock 图表在某些缩放级别上显示点而不是线
我正在使用 Highcharts Stock 图表来显示相对于时间的百分比。
http://jsfiddle.net/michaelchart/yYmPR/1/
在某些缩放级别(在在这种情况下,当时间跨度放大到大约 6 到 12 年之间时,情节会奇怪地从一条线变成零星的点。
关于为什么会这样的任何想法吗?或者这是 Highstock 的一个错误?
您可以在此处查看工作 Highstock 图表的示例 http://www.highcharts.com/股票/演示/基本线。
I am using a Highcharts Stock graph to show a percentage with respect to time.
http://jsfiddle.net/michaelchart/yYmPR/1/
At certain zoom levels (in this case, when zooming to a timespan of between about 6 and 12 years) the plot strangely turns from a line to sporadic points.
Any ideas as to why this might be? Or is it a bug with Highstock?
You can see an example of a working Highstock graph here http://www.highcharts.com/stock/demo/basic-line.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Highstock 论坛上发帖并随后在 github 上发布问题后,我发现这是由于
gapSize
选项的默认值造成的。根据文档;将
gapSize
设置为 null 可以解决问题。After posting on the Highstock forum and consequently having an issue posted on github, I found that it was because of the default value of the
gapSize
option. According to the docs;Setting
gapSize
to null fixes the problem.在我的特定情况下,这个问题的原因是数据输出错误。
在“series”属性中,“data”数组中有一个“false”值。
示例:
更正了后端的问题,因此“false”被解释为 0,现在一切正常。
In my particular case, the reason of this problem was bad data output.
Within "series" property, within the "data" array there was a "false" value.
Example:
Corrected the problem in the backend so "false" was interpreted as 0, and everything works now.