31

After upgrading for Highcharts 2.1.9 to 3.0.0 we found that it seems impossible to render more than 1000 points in one series.

If you add 1000 points to a series it renders ok.

If you add 1001 points to a series it does not render at all. If you interrogate the series afterwards the "data" array on the series is empty.

You can however render multiple series with 1000 points - so there does not seem to be a limitation in terms of the total number of points per chart.

Here is a jsFiddle which illustrates this: http://jsfiddle.net/YWVHx/47/

$(function () {

    var series1Data = [];
    for (var i = 0; i < 1000; i++) {
        series1Data.push({
            x: (new Date()).getTime() + i * 10000,
            y: Math.random() * 100
        });
    }

    var series2Data = [];
        // If you change this back to 1000 the series gets rendered
        for (var i = 0; i < 1001; i++) { 
            series2Data.push({
                x: (new Date()).getTime() + i * 10000,
                y: Math.random() * 100 + 100
            });
    }

    $('#container').highcharts({
        chart: {
            type: 'line'
        },
        title: {
            text: 'Foo'
        },
        xAxis: {
            type: 'datetime'
        },
        yAxis: {
            title: {
            text: null
            }
        },
        tooltip: {
            crosshairs: true,
            shared: true,
            valueSuffix: '°C'
        },
        legend: {
            enabled: true
        },
        series: [{
            name: '1000 Points - I work ;-)',
            data: series1Data
        }, {
            name: '1001 Points - I dont work :-(',
            data: series2Data
        }]
    });
});

Is this a limitation that was imposed on purpose or is it a problem with v3?

Martin Liversage
  • 104,481
  • 22
  • 209
  • 256
Herman
  • 323
  • 1
  • 4
  • 5

2 Answers2

34

You should set bigger turbothreshold: http://api.highcharts.com/highcharts#plotOptions.series.turboThreshold

Sebastian Bochan
  • 37,348
  • 3
  • 49
  • 75
24

For the other user's convenience , this is a complementary example that you can copy and paste:

        plotOptions:{
            series:{
                turboThreshold:5000//set it to a larger threshold, it is by default to 1000
            }
        }

Check http://jsfiddle.net/YWVHx/339/ here for results

JaskeyLam
  • 15,405
  • 21
  • 114
  • 149