1
votes

I have created a dynamically generated timeline using php. The data generation is always the same, but for a specific set of date/times the data points do not appear on the chart.

  • 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

I have created a jsFiddle showing both charts (A working version and a broken version). Below is an example of how each data point is defined.

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

I cannot see what is incorrect in the broken chart. The data format is exactly the same in both, yet the second chart's data points do not appear.

Any help would be appreciated, cheers!

Edit: In the jsFiddle the broken chart code (in the javascript section) starts on line 968

1
Did you notice an interesting thing? When you comment out enough lines so that there are only 333 intervals (comment from line 1973 to 2207) the chart works... I'm quite puzzled too. Some memory constraint maybe?ssarabando
Ah, that is a bit odd. I know there is some restrictions to the amount of data points, but I thought that it was in the 10,000 mark or so. Was it specifically 333 intervals? (d/w it is exactly 333 intervals. Weird)Dan Mason
Yes, exactly 333. If I add a 334th interval it no longer plots. I created a copy in my web server to see if it did throw some kind of error, but nothing. I've plotted more than 333 data points in my projects but with highstocks instead of highcharts, but I find that such a low number of points odd too.ssarabando
If you only push the date and the value (as an array of two values) instead of pushing the objects, it will plot all the points (but you loose the ability to show the tooltip as is), so it really must be related to the amount of data.ssarabando
Have you tried to modify turbothresHold param ? api.highcharts.com/highcharts#plotOptions.series.turboThresholdSebastian Bochan

1 Answers

2
votes

Thanks to ssarabondo and Sebastian Bochan for suggestions. The issue has now been fixed. The problem was to do with a max limit of data points.

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

Since my data sets are not going to be larger than 10,000 I changed the "turboThreshold".

turboThreshold:10000;

I dont think this is advisable when working with much larger data sets though.

Here is the updated jsFiddle

And thanks to all who offered some help.