gpt4 book ai didi

javascript - HighCharts - 数据点未出现

转载 作者:行者123 更新时间:2023-11-30 17:59:24 24 4
gpt4 key购买 nike

我已经使用 php 创建了一个动态生成的时间轴。数据生成始终相同,但对于一组特定的日期/时间,数据点不会出现在图表上。

  • 29th April 2013 - 06:00:00 -> 1st May 2013 - 06:00:00 <--- Working

  • 29th April 2013 - 06:00:00 -> 2nd May 2013 - 06:00:00 <--- Broken

enter image description here

我创建了一个 jsFiddle显示两个图表(工作版本和损坏版本)。下面是如何定义每个数据点的示例。

intervals: [{
from: Date.UTC(2013, 3, 29, 06, 12, 31),
to: Date.UTC(2013, 3, 29, 06, 17, 13)
}]

我看不出损坏的图表中有什么不正确的地方。两者的数据格式完全相同,但没有出现第二张图表的数据点。

任何帮助将不胜感激,干杯!

编辑:在 jsFiddle 中,损坏的图表代码(在 javascript 部分)从第 968 行开始

最佳答案

感谢 ssarabondo 和 Sebastian Bochan 的建议。该问题现已解决。问题在于数据点的最大限制。

"When a series contains a data array that is longer than this, only one dimensional arrays of numbers, or two dimensional arrays with x and y values are allowed. Also, only the first point is tested, and the rest are assumed to be the same format. This saves expensive data checking and indexing in long series. Defaults to 1000."

[Source - http://api.highcharts.com/highcharts#plotOptions.series.turboThreshold]

由于我的数据集不会超过 10,000,因此我更改了“turboThreshold”。

turboThreshold:10000;

不过,我认为在处理更大的数据集时不建议这样做。

Here is the updated jsFiddle

感谢所有提供帮助的人。

关于javascript - HighCharts - 数据点未出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17401622/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com