AboutMe Report post Posted March 16, 2008 Hello How I can display 2 charts on one page? I trying something like that. but shows only one chart <script language="JavaScript" src="http://www.domain.com/flash/FusionCharts.js"></script> <div id="chartdiv" align="left"> FusionCharts. </div> <script type="text/javascript"> var chart = new FusionCharts("http://www.domain.com/flash/x.swf", "ChartId", "450", "220"); chart.setDataURL("http://www.domain.com/flash/data/1-mini.php"); chart.setDataURL("http://www.domain.com/flash/data/2-mini.php"); chart.render("chartdiv"); </script> and that <script language="JavaScript" src="http://www.domain.com/flash/FusionCharts.js"></script> <div id="chartdiv" align="left"> FusionCharts. </div> <script type="text/javascript"> var chart = new FusionCharts("http://www.domain.com/flash/x.swf", "ChartId", "450", "220"); chart.setDataURL("http://www.domain.com/flash/data/eurusd-mini.php"); chart.render("chartdiv"); </script> <script language="JavaScript" src="http://www.domain.com/flash/FusionCharts.js"></script> <div id="chartdiv" align="left"> FusionCharts. </div> <script type="text/javascript"> var chart = new FusionCharts("http://www.domain.com/flash/x.swf", "ChartId", "450", "220"); chart.setDataURL("http://www.domain.com/flash/data/gbpusd-mini.php"); chart.render("chartdiv"); </script> Share this post Link to post Share on other sites
Arindam Report post Posted March 17, 2008 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> Hi Aboutme, Please note that you need to give unique names to DIV ids, JavaScript objects and chart objects. Also note that you need to use the XML url from the same domain as the domain of the SWF file. Follow that code : <script language="JavaScript" src="http://www.domain.com/flash/FusionCharts.js"></script> <div id="chartdiv1" align="left"> FusionCharts. </div> <script type="text/javascript"> var chart1 = new FusionCharts("http://www.domain.com/flash/x.swf", "ChartId1", "450", "220"); chart1.setDataURL("http://www.domain.com/flash/data/eurusd-mini.php"); chart1.render("chartdiv1"); </script> <div id="chartdiv2" align="left"> FusionCharts. </div> <script type="text/javascript"> var chart2 = new FusionCharts("http://www.domain.com/flash/x.swf", "ChartId2", "450", "220"); chart2.setDataURL("http://www.domain.com/flash/data/gbpusd-mini.php"); chart2.render("chartdiv2"); </script> Thanks Arindam FusionCharts Team www.fusioncharts.com Share this post Link to post Share on other sites
AboutMe Report post Posted March 17, 2008 I see works great, thanks Share this post Link to post Share on other sites