Highcharts不会显示大量数据点的系列 [英] Highcharts doesn't display series with lots of data points

查看:216
本文介绍了Highcharts不会显示大量数据点的系列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张图表,我想根据用户的日期范围显示。此特定图表每15分钟有一个数据点。因此,如果用户选择较大的日期范围,则每个系列可能会有很多数据点。这里有几个例子:



在第一个示例中,显示。在第二个示例中,图表不显示。有一个Highstock演示( 52,000分与数据分组),与很多的数据点。我试图将上面的图表更改为高股价图表,仍然有相同的结果。

我能做些什么来解决这个问题?

div>

这是由于 turbo阈值选项:


当一个系列包含的数据数组长度超过这个数时,只有一个
的数组数组或二维数组x和y
值是允许的,而且,只有第一个点被测试,其余的
被假定为相同的格式,这节省了昂贵的数据检查
和长序列的索引。


默认设置为1000分。您的图表不会呈现,因为系列中的每个点都是一个对象,并且它们的数量大于阈值。



以下是 jfFiddle 展示你的绘图工作的门槛设置为2000。



以下是代码的修改部分:

  plotOptions:{
spline:{
turboThreshold:2000,
...

另一个解决方案是将你的系列数据编码成一个二维数组,而不是用xy属性表示每个点,用xy属性。


I have a chart that I would like to display based on a date range from the user. This particular chart has a data point for every 15 minutes. So there can be a lot of data points for each series if a users selects a large date range. Here is a couple of examples:

In the first example the chart does display. In the second example the chart does not display. There is a Highstock demo (52,000 points with data grouping) that works with a lot of data points. I have tried to change the above charts to a highstock chart and still have the same results.

What can I do to fix this?

解决方案

This is due to the turbo threshold option:

"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."

It is set to 1000 points by default. Your chart is not rendering because each point in your series is an object and their number is greater than the threshold.

Here's a jfFiddle demonstrating your plot working with the threshold set to 2000.

Here's the modified section of code:

plotOptions: {
     spline: {
     turboThreshold: 2000,
    ...

Another solution would be to encode your series data in a 2-d array instead of having each point represented by and object with x-y properties.

这篇关于Highcharts不会显示大量数据点的系列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆