0
votes

Hi I am using Bullet charts in Fusion charts.I am using the same sample code given for bullet graphs and instaed of taking data values from a file in data folder i am trying to set the data on the HTML page itself.

<div align="center">
<script type="text/javascript">
 var myChart = new FusionCharts       ("Charts/VBullet.swf", "myChart4", "80", "270", "0", "0");

 myChart.setDataURL("Data/WageIncrease.xml");

   myChart.render("chartdiv4");
  </script>
   </div>

REPLACED WITH

 </div><div align="center">
<script type="javascript">
 var myChart = new FusionCharts     ("Charts/VBullet.swf", "myChart4", "80", "270", "0", "0");
  myChart.setDataXML("<chart>
   <value>13</value>
  <target>74</target>
  </chart>");
 myChart.render("chartdiv4");
 </script>

But this is not working what am i doing wrong????

1

1 Answers

0
votes

Please try removing the new line characters and provide it without any space in between the tags, when providing the XML in Data String method.

</div><div align="center">
<script type="javascript">
 var myChart = new FusionCharts     ("Charts/VBullet.swf", "myChart4", "80", "270", "0", "0");
  myChart.setDataXML("<chart><value>13</value><target>74</target></chart>");
 myChart.render("chartdiv4");
 </script>