Reputation: 173
Here is my Highchart. On the right the X axis value is correct (2017.08.03). But when it starts to step, it steps backwards, to 01/18/1970. The Y value is correct also. Here is an example from my JSON data:
[[1501746396.26,22.96],[1501746396.26,24.2],[1501746396.26,28.55],[1501746396.26,27.54],[1501746396.26,22.12]
The first value is the current UNIX-time, the second is the Y-value. Here is an example, how I add point to my series.
chart.series[i].addPoint(dataa[i], true, shift);
While debugging I've noticed, that it received the correct data. (I've logged chart.series[i].data, it has points.) Also at inicialize it receives the correct data, but at inicialize it doesn't work from this JSON file, it works from another JSON file.
Upvotes: 2
Views: 121
Reputation: 173
I had to multiple my value with 1000 to get milliseconds, because Highcharts expects milliseconds. :)
Upvotes: 1