Highcharts系列渲染问题

时间:2016-08-25 14:57:21

标签: javascript highcharts highstock

我与Highcharts和Highstock合作,我的图表工作很奇怪;它显示标记之间的垂直线。

Demo chart

如您所见,垂直线出现,它们不应该出现。

1 个答案:

答案 0 :(得分:1)

您的数据已填充且包含重复的x值,就像从数据数据的最后几个元素中获取的此代码段一样:

    [Date.UTC(2015, 0, 31, 6, 38, 0), 1.32905],
    [Date.UTC(2015, 0, 31, 6, 38, 0), 1.30528],
    [Date.UTC(2015, 0, 31, 10, 8, 0), 1.49073],
    [Date.UTC(2015, 0, 31, 10, 8, 0), 1.46641],
    [Date.UTC(2015, 0, 31, 12, 5, 0), 1.33667],
    [Date.UTC(2015, 0, 31, 12, 5, 0), 1.33403],
    [Date.UTC(2015, 0, 31, 14, 5, 0), 1.39598],
    [Date.UTC(2015, 0, 31, 14, 5, 0), 1.50467],
    [Date.UTC(2015, 0, 31, 15, 40, 0), 1.29815],
    [Date.UTC(2015, 0, 31, 15, 40, 0), 1.27599],

如果您不希望以这种方式绘制数据,请从数据中删除重复的x值。