satheesans

Fusion Chart exporting and saving in one click

Recommended Posts

Hi,
 
I am very new to Fusion Chart. I have a question. I would like to provide a button on which by clicking, the export functionality to be called and after exporting, the file saving dialo should open up to save the chart. Right now I have the following code. I am not interested to provide context menu.
 
 function ExportMyChart() {
             var chartObject = FusionCharts('myChartId');
             if( chartObject.hasRendered() ) chartObject.exportChart();
       }  
 
Here, after exporting, the user need to click again to the gererated flash (save) button to save the file to disk. Is there any method available in the fusion chart API which which will perform the action to open the File Save dialog. I hope I can cal the same function in "FC_Exported" function (Please find the attached screen shot)

 

Pleae help me to solve the issue

 

Thanks a lot,

Sudheesh

post-51401-0-58986300-1375787074_thumb.jpg

Share this post


Link to post
Share on other sites

Hi,

 

Apologies for delay.

 

FusionCharts XT is made in Flash 8 (AS2) which does not support byte-streams and file downloads. However, Flash 10 (AS3) does support the same. So, the Export Component has been coded in Flash 10 (AS3) to be able to handle image/PDF building (using byte streams) and to allow download of the same. Hence, it is not possible to perform the operation of exporting and saving in just one button click.

 

But as a workaround to this problem, you may export the chart as soon as it gets rendered and disable the export dialog from showing up. Then you can have flash component to save the chart to appear when the export is ready. By doing this, you will have just one button on your page. But, the limitation of using this method is that the flash component appears with a delay after the chart gets rendered (which can be handled by showing a status message).

 

Hope I am able to clarify myself. :)

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