John Fred John Fred - 6 months ago 27
Javascript Question

Highstock - Replace data set every min

I'm trying to have my Highstock chart update every minute, by replacing its existing data set with one that is extracted from a url request (which would have different data at different times).

So far I'm not even able to get the data to refresh based on manual changes.

Work so far:

I'm trying to test changing data and then updating it with:

varData = [[0,0],[1,2]]

Which does nothing.


You can set the new data to highchart in following way:

     var newData = [
       [1251763200000, 23.61],
       [1251849600000, 23.60],
       [1251936000000, 23.79]

     var chart = $('#chart2').highcharts();


Updated fiddler: