mssjdb

How To Know After Server Side Export Completed On Fusion Charts?

Recommended Posts

am using fusion charts. and am exporting graphs to server side as pngs. here i have more than 20 graphs. now have to run another file if exporting was completed. it is taking nearly 4 min to complete export.


Now my doubt is, how i can know wither download completed or not using jquery or any other.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Welcome to FusionCharts Forum!

 

Apologies for the delay.

 

You can use JavaScript callback handler method which will be invoked, after the chart has been saved as image on the server.

 

You would need to use FC_Exported event which is invoked when chart completes the export process

 

Ref. Code:

 

 function FC_Exported(objRtn){              
              if (objRtn.statusCode=="1"){
                 alert("The chart was successfully saved on server. The file can be accessed from " + objRtn.fileName);
              }else{
                 alert("The chart could not be saved on server. There was an error. Description : " + objRtn.statusMessage);
              }
           }
 
For more information, please refer the following link:
 
Also, find attached illustration for your reference.
 
Hope this helps!
 

 

Share this post


Link to post
Share on other sites

Hi,

 

Can I say this FC_Exported(objRtn) is only for every individual chart?

 

That's mean if I have 20 charts call back, it will prompt 20 times to inform me every chart successfully saved on server.

 

Is there any event handler that can tell me all my charts are successfully saved so that I can proceed/redirect to other page (to generate PDF and include the chart image and so on)?

 

Appreciate your kind advise.

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Please note that the event "Exported" will be raised each time, when a chart is finished exporting.

 

Since, for each chart FusionCharts framework will create different object instances with unique chart IDs, the FC_Exported function (event model of Exported event) will be called each time. So for 20 charts, 20 call back happens.

 

Currently, we do not have any global event handler which could fire, only after all the charts (in a page) export successfully.

 

However, you could increment a counter in "FC_Exported" function and check if's value is equal to the number of charts present in a page, then redirect to other page.

 

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