javascript - Highchart loading csv with 2 values -


I am having a lift problem with hightechs because I am a total Noble with javascript.

I want a chart with highchartes that shows the date on the x-axis and the value on the y-axis. I am using a CSV file ( results.csv ) that looks like this:

  821,2013-11-12 1623,2013-11- 13  

... and so on.

I used the highchart document and example on the website on preprocessing CSV data. I have created a website with 4 different charts and 4 CSV files, but all those files were created as examples on the High Chart using the same layout. Now I want to use other CSV files.

My code looks like this:

  $ Get ('./ results.csv', function (data) {/ / lines divide var line = data. Split ('\ n'); $ .EEE (line, function (line no, line) {var Items = line. Split (','); // If there are categories in the header line (line not == 0) {$ .eu (item, function (item no, item) {if (item no & gt; 0 ) Options. XAxis.categories.push (item);}) //} The remaining rows contain data in the first place with their name {var series = {data: []}; $ .eee (item, function ( Items, items) {if (item no Only == 0) {series.name = item;} else {series .data.push (parseFloat (item));}}) options.series.push (series);}}); var chart 4 = new highchart Chart (option);});  

I'm stuck.


Comments