Loading Highcharts series from XML using jQuery

GlobalTravell

New Member
I am trying to populate a higchart series from an xml source using jQuery. The XML file is an export from RRDTool and has the following format:\[code\]<data><row><t>1347559200</t><v>2.1600000000e+01</v></row><row><t>1347562800</t><v>2.1504694630e+01</v></row><row><t>1347566400</t><v>2.1278633024e+01</v></row>...</data>\[/code\]My approach was to load the data using jQuery and push the series to the chart:\[code\]$.ajax({ type: "GET", url: "data/data.xml", dataType: "xml", success: function(xml) { var series = { data: [] }; $(xml).find("row").each(function() { var t = parseInt($(this).find("t").text())*1000 var v = parseFloat($(this).find("v").text()) series.data.push([t,v]); }); options.series.push(series); } });\[/code\]I end up getting the following error: \[quote\] Unexpected value NaN parsing y attribute\[/quote\]I created a JSFiddle to demonstrate the code: http://jsfiddle.net/GN56f/
 
Back
Top