Sign in to follow this  
bsklar

FC_Rendered bug?

Recommended Posts

I have the following code:

<HTML>
<HEAD>
  <TITLE>FusionCharts & JavaScript - Basic Example</TITLE> 
 <script language="JavaScript" src="../JSClass/FusionCharts.js"></script>
  <SCRIPT LANGUAGE="JavaScript">
  //FC_Rendered method is called whenever a FusionCharts chart on the page
  //has finished initial rendering. To this function, the chart passes its 
  //own DOM Id.
var values = [];
var ren_Chart_dip = false;
var ren_Chart_dzn = false;
var ren_Chart_dhn = false;
//FC_Rendered method is called whenever a FusionCharts chart on the page
//has finished initial rendering. To this function, the chart passes its 
//own DOM Id.
function FC_Rendered(DOMId){
 //If it's our required chart
 if (DOMId=="Chart_dip"){
 ren_Chart_dip = true;
 }
 if (DOMId=="Chart_dzn"){
 ren_Chart_dzn = true;
 }
 if (DOMId=="Chart_dhn"){
 ren_Chart_dhn = true;
 }
 if (ren_Chart_dip && ren_Chart_dzn && ren_Chart_dhn){
  alert("All charts rendered");
 }
 return;
}
   </SCRIPT>
</HEAD>
<BODY>
  <div id="chart1div">
  FusionCharts
  </div>
  <div id="chart2div">
  FusionCharts
  </div>
  <div id="chart3div">
  FusionCharts
  </div>
  <script language="JavaScript"> 
  var dip_chart1 = new FusionCharts("../Charts/Pie3D.swf", "Chart_dip", "400", "300", "0", "1"); 
  dip_chart1.setDataXML("<chart><set label='A' value='10' /><set label='B' value='11' /></chart>");
  dip_chart1.render("chart1div");

  var dzn_chart2 = new FusionCharts("../Charts/Pie3D.swf", "Chart_dzn", "400", "300", "0", "1"); 
  dzn_chart2.setDataXML("<chart><set label='A' value='10' /><set label='B' value='11' /></chart>");
  dzn_chart2.render("chart2div");

  var dhn_chart3 = new FusionCharts("../Charts/Pie3D.swf", "Chart_dhn", "400", "300", "0", "1");
  dhn_chart3.setDataXML("<chart><set label='A' value='10' /><set label='B' value='11' /></chart>");  
  dhn_chart3.render("chart3div");
  </script>
</BODY>
</HTML>

if I change the line of:

dhn_chart3.setDataXML("<chart><set label='A' value='10' /><set label='B' value='11' /></chart>"); 

to

dhn_chart3.setDataXML("<chart><set label='A' value='42010' /><set label='B' value='11' /></chart>"); 

It will not display the alert of "All Charts rendered".

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