ssubram Report post Posted March 4, 2009 Hi First of all, thanks for sharing a great product! I'm using the following code for setdataxml method. It does not work. Can you please help? <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>RSA Test Chart</title> <link rel="stylesheet" href="style.css" type="text/css" /> <script language="JavaScript" src="FusionCharts.js"></script> </head> <body> <p><img src="logo_rsa.gif" width="112" height="58"></p> <table width="98%" border="0" cellspacing="0" cellpadding="3" align="center"> <tr> <td valign="top" class="text" align="center"> <div id="chartdiv" align="left"> </div> <script type="text/javascript"> var chart = new FusionCharts("FCF_MSLine.swf", "ChartId", "850", "500"); chart.setDataXml("<graph caption='February Peak Load vs. Today' xAxisName='Hour Ending' yAxisName='Load (MW)' hovercapbg='FFECAA' hovercapborder='F47E00' formatNumberScale='0' decimalPrecision='0' showvalues='0' animation='1' numdivlines='3' numVdivlines='0' yaxisminvalue='1000' yaxismaxvalue='1800' lineThickness='3' rotateNames='1'> <categories> <category name='1' /> <category name='2' /> <category name='3' /> <category name='4' /> </categories> <dataset seriesname='February Peak Load' color='FF8000' showValue='1' alpha='80' showAnchors='0'> <set value='1550' /> <set value='1550' /> <set value='1550' /> <set value='1550' /> </dataset> <dataset seriesname='Current Day 2/3/05' color='0099FF' showValue='1' alpha='100' anchorAlpha='0' lineThickness='2'> <set value='1188' /> <set value='1189' /> <set value='1177' /> <set value='1175' /> </dataset> </graph>"); chart.render("chartdiv"); </script> </td> </tr> <tr> <td valign="top" class="text" align="center"> </td> </tr> </table> </body> </html> Thanks a lot. Share this post Link to post Share on other sites
Rahul Kumar Report post Posted March 4, 2009 Hi, Could you please pass the XML without breaking it into multiple lines, and try again? chart.setDataXml("<graph caption='February Peak Load vs. Today' xAxisName='Hour Ending' yAxisName='Load (MW)' hovercapbg='FFECAA' hovercapborder='F47E00' formatNumberScale='0' decimalPrecision='0' showvalues='0' animation='1' numdivlines='3' numVdivlines='0' yaxisminvalue='1000' yaxismaxvalue='1800' lineThickness='3' rotateNames='1'><categories><category name='1' /><category name='2' /><category name='3' /><category name='4' /></categories><dataset seriesname='February Peak Load' color='FF8000' showValue='1' alpha='80' showAnchors='0'><set value='1550' /><set value='1550' /><set value='1550' /><set value='1550' /></dataset><dataset seriesname='Current Day 2/3/05' color='0099FF' showValue='1' alpha='100' anchorAlpha='0' lineThickness='2'><set value='1188' /><set value='1189' /><set value='1177' /><set value='1175' /></dataset></graph>"); Share this post Link to post Share on other sites
ssubram Report post Posted March 4, 2009 Hi Thanks for your quick reply. I copied and pasted as below - But it sill still not working! <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>RSA Test Chart</title> <link rel="stylesheet" href="style.css" type="text/css" /> <script language="JavaScript" src="FusionCharts.js"></script> </head> <body> <p><img src="logo_rsa.gif" width="112" height="58"></p> <table width="98%" border="0" cellspacing="0" cellpadding="3" align="center"> <tr> <td valign="top" class="text" align="center"> <div id="chartdiv" align="left"> </div> <script type="text/javascript"> var chart = new FusionCharts("FCF_MSLine.swf", "ChartId", "850", "500"); chart.setDataXml("<graph caption='February Peak Load vs. Today' xAxisName='Hour Ending' yAxisName='Load (MW)' hovercapbg='FFECAA' hovercapborder='F47E00' formatNumberScale='0' decimalPrecision='0' showvalues='0' animation='1' numdivlines='3' numVdivlines='0' yaxisminvalue='1000' yaxismaxvalue='1800' lineThickness='3' rotateNames='1'><categories><category name='1' /><category name='2' /><category name='3' /><category name='4' /></categories><dataset seriesname='February Peak Load' color='FF8000' showValue='1' alpha='80' showAnchors='0'><set value='1550' /><set value='1550' /><set value='1550' /><set value='1550' /></dataset><dataset seriesname='Current Day 2/3/05' color='0099FF' showValue='1' alpha='100' anchorAlpha='0' lineThickness='2'><set value='1188' /><set value='1189' /><set value='1177' /><set value='1175' /></dataset></graph>"); chart.render("chartdiv"); </script> </td> </tr> <tr> <td valign="top" class="text" align="center"> </td> </tr> </table> </body> </html> Share this post Link to post Share on other sites
Rahul Kumar Report post Posted March 4, 2009 Hi, Please change chart.setDataXml to chart.setDataXML. Share this post Link to post Share on other sites
ssubram Report post Posted March 4, 2009 Great!!!! works now! Thanks a lot.:w00t: Share this post Link to post Share on other sites