thejose

Update Caption / subCaption only for PNG/XLS/PDF Chart Export

Recommended Posts

Hi,

I'm trying to find a way so that when users click on the Export options in the upper right hand corner of a (say a pie) chart, I'd be able update and have a custom caption or subCaption for the exported file (and not exactly like captions of the rendered chart on the page)
Is there a way to do this? I was thinking of perhaps changing caption / subCaption just before export, but i'm not sure how or which element to add a listener for that.

 

Thank you :)

Share this post


Link to post
Share on other sites

Hi,

FusionCharts does not support having a different caption/ subCaption in the exported file other than the initially provided caption/ subCaption text before rendering the chart.

However, as a workaround, you can update your caption/ subCaption just before exporting your chart to have a custom caption/ subCaption in the exported file by using the "exportChart()" API method.

Please refer to this link for the implementation: http://jsfiddle.net/srishti_fc/a45u1jet/72/

In the above sample, we have a HTML drop-down for "PNG/JPG/PDF" formats which you can choose before clicking on the "Export Chart" button. Just after clicking the "Export Chart" button we have updated the chart caption using the "setChartAttribute()" API and then the "export_chart()" function is called asynchronously to assure that the chart has the updated caption before calling the "exportChart()" API.

Hope this will help.

Thanks,
Srishti Jaiswal

Share this post


Link to post
Share on other sites

Hi Srishtithanks for your reply.

What about adding the caption/subCaption to the XLSX export? Is there a way to add more to that excel export?

Thanks!

Edited by thejose

Share this post


Link to post
Share on other sites

Hi,

In FusionCharts, you can export your data in the XLSX file which does not include your caption/ subCaption. You can export caption/ subCaption in image or PDF formats but it is not possible in XLSX format. 

Hope this will help.

Thanks,
Srishti Jaiswal

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