Sign in to follow this  
fabiom2211

More than one chart in html

Recommended Posts

Hi,

Welcome to FusionCharts Forum. :)

How do I put more than one chart in html?

In case you wish to display several charts on one page, you can do that by including the chart rendering code as many times as the number of charts to be displayed.

 

Please make sure that the div id and the DOM id for each chart is unique. Also, you need to provide separate XML files depending on the chart to be displayed.

Please refer to this section of code to find the way to display a Single-series Bar2D and a Column2D chart simultaneously on the same page.

Ref.- <script type="text/javascript">

  var chart = new FusionCharts("Coulmn2D.swf", "ChartId", "350", "375", "0", "0");

  chart.setDataURL("Column2D.xml");

  chart.render("chartdiv");

 </script> </td>

  <td valign="top" class="text" align="center"> <div id="chartdiv1" align="center"> </div>

  <script type="text/javascript">

  var chart = new FusionCharts("Bar2D.swf", "ChartId", "350", "375", "0", "0");

  chart.setDataURL("Bar2D.xml");

  chart.render("chartdiv1");

  </script> </td>

Hope this helps. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this