I'm trying to create a Highstock chart from Xively data.
I'm able to create regular line chart from a historic query of a Xively datastream and with some basic data format adaptation I am able to pass it to Highcharts.Chart().
I have tried making Highstock chart without any success.
I'm new to using Highcharts and I'm not familiar with JavaScript.
In the basic Highcharts example you have a bit of code which adapts the data format. That code takes the array of datapoint objects with
value/atkeys and making a two-dimensional array.It maps this:
to this:
I can do this using a simple for-loop and I also used
Date.parse()as well asparseFloat()to ensure Highcharts understand my data correctly:I then pass
chartdataarray to the Highcharts like so: