// Load the data from the XML file $.get('Report.xml', function(xml) { // Split the lines var $xml = $(xml); // push categories $xml.find('Gateway_ID').each(function(i, Gateway_ID) { options.xAxis.categories.push($(Gateway_ID).text()); }); // push series $xml.find('QueryResults').each(function(i, QueryResults) { var seriesOptions = { name: $(series).find('FoutPercentage24hr').text(), data: [] }; // push data points $(series).find('data point').each(function(i, point) { seriesOptions.data.push( parseInt($(point).text()) ); }); // add it to the options options.series.push(seriesOptions); }); var chart = new Highcharts.Chart(options); }); $(document).ready(function() { var options = { chart: { renderTo: 'container', type: 'spline' }, series: [{}] }; $.getJSON('data.json', function(data) { options.series[0].data = data; var chart = new Highcharts.Chart(options); }); });