Sign in to follow this  
Damon

How To Checks Whether A Fusioncharts Flash Is Unload

Recommended Posts

Dears,

 

I have gone through the API Reference, but not found any properties or functions that i can use to checks whether a FusionCharts flash is unload.

 

Could any body give me a hand? Thanks very much.

Share this post


Link to post
Share on other sites

Thanks very much for your quick answer.

 

 

Could you please give me an demo how to use it. As detailed as possible. Thanks very much.

Hi,

 

You can check with the dispose event.

Share this post


Link to post
Share on other sites

Hi,

 

Since I do not know what chart type you are rendering, I am putting up a generic example. This example does the following:

 


  1.  
  2. Renders a Column 3D chart.
  3. When it is disposed clicking "Unload Chart" button the 'disposed' event is listened.
  4. An alert is shown through the event listener function stating that the chart is unloaded.

 

 

<div id="chartContainer">FusionCharts will load here!</div>

<script type="text/javascript"><!--

   var myChart = new FusionCharts( ".../Charts/Column3D.swf", "myChartId", "400", "300", "0");
   myChart.setXMLData('<chart caption="Weekly Sales Summary" xAxisName="Week" yAxisName="Sales" numberPrefix="$"><set label="Week 1" value="14400" /><set label="Week 2" value="19600" /><set label="Week 3" value="24000" /><set label="Week 4" value="15700" /></chart>');
   myChart.render("chartContainer");

   FusionCharts.addEventListener ( "Disposed", function (identifier, parameter) {
       alert("Your chart with ID: " + identifier.sender.id + " has been unloaded.");
   });

</script>

<input  onClick=" myChart.dispose();" value="Unload Chart" type="button"/>

 

 

You can learn more on how to use FusionCharts events from http://docs.fusioncharts.com/charts/?JavaScript/JS_EventOverview.html and you can get the list of available events from http://docs.fusioncharts.com/charts/?JavaScript/API/Events.html

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