title: Populate FusionCharts with XML data AJAX
body: <p>Hi I have a js file that uses ajax to get a XML doc from a php script . The XML file forms the data to draw a Fusion Chart. I know I am getting the XML data ok but FusionCharts will not draw it . I would really appreciate any help , thanks </p>
  
  <pre><code>(FusionCharts.js is included earlier in my script) 
  
  if(XMLHttpRequestObject) {
  
  XMLHttpRequestObject.open("GET", "chart.php?job="+job, true);
  
  XMLHttpRequestObject.onreadystatechange = function() { 
  if (XMLHttpRequestObject.readyState == 4 &amp;&amp;  XMLHttpRequestObject.status == 200) { 
  var xdoc = XMLHttpRequestObject.responseXML;
  
       var chart1 = new FusionCharts("Pie3D.swf", "chart1Id", "400", "300", "0", "1"); 
   chart1.setDataXML(xdoc);
       chart1.render("chart1div");
  </code></pre>
  
  <p><strong>chart.php produces this XML data</strong>  </p>
  
  <pre><code>&lt;chart caption='ADI Chart Test ' &gt;
    &lt;set label='Driver' value='12.25' /&gt;
    &lt;set label='Other Staff' value='223.21' /&gt;
    &lt;set label='Equipment' value='0.00' /&gt;
    &lt;set label='Additional Items' value='0.00' /&gt;
    &lt;set label='Vehicle Fuel' value='0.00' /&gt;
    &lt;set label='Accomodation' value='0.00' /&gt;
    &lt;set label='Generator Fuel' value='0.00' /&gt;
  &lt;/chart&gt;
  </code></pre>