jarrodb291

Batch export multiple charts to single image

Recommended Posts

I have three charts rendering correctly and I would like to provide the user with a button they can press to generate a PDF copy of the current view. I understand a way to do this is to export the three charts to images, save the images in a folder on the server then embed these into a PDF using a third party PDF library. I have been able to do this and it seems to work however I get three separate JS CallBacks using 'FC_Exported'.

 

 

 

I have noticed that if I use the batch export mode, all charts export fine but I then have to click the 'Save All' button to save them into a single image file. A single image file is easier for me to handle. So two questions....

 

 

 

1. Is there a way to get a single JS Call Back when all three chart images are exported?

 

2. Is it possible to have all chart images saved into a single server side file without having to press two buttons?

 

 

 

Thanks in advance.

 

 

 

J

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

If you use the Batch exporting method of FusionCharts, the exported images will be saved as a single image.

Share this post


Link to post
Share on other sites

Hi, and thanks for the super fast reply!

 

 

 

I have tried using the batch export mode and I agree this does work at saving all chart images to a single file however this requires the use of the 'FusionCharts Export Handler Component' DIV and two button clicks. I would be happy to use this if I could trigger the 'Save All' button using JS.

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

You can try modifying the FusionChartsExportComponent.js to achieve this.

What you need to do is create an image file object on calling the JS call back function the first time and now for every subsequent callback you can open the same file and append the new image to it. So all the charts get saved as a single image.

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