Highstocks, line missing but data is there

可紊 提交于 2019-12-01 09:53:31

问题


I've been playing around with Highstocks for a while now and for some reason one of my lines has disappeared when zooming in, yet it is still visible once zoomed out. It still shows the dot once hovering over it including the data that belongs to it.

Needless to say I'm pretty clueless about what went wrong, so any suggestions would be great.

Zoomed in:

Zoomed out (hard to see but the red line is there)

PS. Website can be found here Skami.net


回答1:


Your series contains doubled values for the same data, for example:

    [1368450000000, null], 
    [1368450000000, 117.200050354004], 
    [1368451800000, null],
    [1368451800000, 117.599990844727],
    [1368453600000, null],
    [1368453600000, 117.710151672363]

Which is not allowed in Highcharts. Remove extra point and will be working fine.




回答2:


I advice to disable dataGrouping

http://api.highcharts.com/highstock#plotOptions.series.dataGrouping.enabled




回答3:


In the specific example, points are not rendered, when having points with a null-value. Example from today (taken from Skami.net):

[1369881000000,131.74983215332],
[1369882800000,null],
[1369884600000,null],
[1369886400000,131.354995727539],
[1369888200000,null],
[1369890000000,null],
[1369891800000,130.976699829102]

The points above will be visible in the tooltip, but not rendered as a graph, because points with a null-value is in between the point with a value.



来源:https://stackoverflow.com/questions/16516683/highstocks-line-missing-but-data-is-there

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!