So you have the following data structure, right?
1355417598678,22.25 1355417620144,22.25 1355417625616,22.312 1355417630851,22.375 1355417633906,22.437 1355417637134,22.437 1355417641239,22.5 1355417641775,22.562 1355417662373,22.125 1355417704368,21.625
Then you break it into an array of strings, so each element of the array is a string.
Then for each line you do the following.
var items = line.split(';'); // wrong, use ','
But not there ; in the line, you must split using,.
The result will be a multi-disk array, each element of which is an array with the following structure. It will be stored in var named data .
"1355417598678","22.25" // date in utc, value
This is the expected data for each series, so you can transfer it directly to your serie .
var serie = { data: data, name: 'serie1'
The result is a working char t.
So, everything can be renewed until the next.
var lines = data.split('\n'); lines = lines.map(function(line) { var data = line.split(','); data[1] = parseFloat(data[1]); return data; }); var series = { data: lines, name: 'serie1' }; options.series.push(series);