Sign in to follow this  
tristan

Exporting Chart Works Only 1 Time

Recommended Posts

Hi,

I use pure javascript to render my charts. Try to export the chart by below method. But I find it works only the first time I click the "Export" button. I debugged the js, found jsVars.hcObj.options undefined. How can I make the button work every time it is clicked. Thanks.

<input type="button" value="Export" onclick="exportChart('myChartId','pdf')">

 

<script type="text/javascript">

function exportChart (DOMId,type){

if ( FusionCharts(DOMId).exportChart ){

FusionCharts(DOMId).exportChart({"exportFormat":type});

}

}

</script>

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

We had already reported this issue and our developers are looking into it.

 

This issue would be fixed in the upcoming release.

 

Further any updates on this we would inform you.

 

Thank you for your continued patience and patronage.

Share this post


Link to post
Share on other sites

Hi,

Based on current version, is there any method to export the chart? Is it possible to fire the click event of the export icon in the chart?

post-28412-0-49526400-1341370681_thumb.jpg

Hi,

 

We had already reported this issue and our developers are looking into it.

 

This issue would be fixed in the upcoming release.

 

Further any updates on this we would inform you.

 

Thank you for your continued patience and patronage.

Edited by tristan

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

There is no other methods available to fire the click event of the export icon in the chart as of now.

 

Currently this is what we have to offer you.

 

Thank you for your continued patience and patronage.

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

It seems, there is no updates for the issue of "exportChart() function not firing multiple times in JavaScript mode".

 

We will keep you posted for any further updates.

Share this post


Link to post
Share on other sites

I thought that is what this example did. It also says you can hide the download button using exportShowMenuItem="0".

 

 

 

 

<html>

<head>

<title>My Chart</title>

<script type="text/javascript" src="FusionCharts/FusionCharts.js"></script>

<script type="text/javascript">

function ExportMyChart() {

var chartObject = FusionCharts('myChart');

if( chartObject.hasRendered() ) chartObject.exportChart();

}

</script>

</head>

<body>

<div id="chartContainerDiv">FusionCharts loaded here...</div>

<script type="text/javascript">

var myChart = new FusionCharts('FusionCharts/Column3D.swf', 'myChart', '900', '300', '0', '1');

myChart.setXMLUrl('Data.xml');

myChart.render('chartContainerDiv');

</script>

<input type="button" value="Export My Chart" onclick="ExportMyChart()" />

</body>

</html>

 

I have something similar except that my js function ExportMyChart is in a separate js file. The js code to create and render a new chart is also in a separate file. When I try to export I get an error that

  • Uncaught RuntimeException: #25081840 undefined Error >> Use the "new" keyword while creating a new FusionCharts object FusionCharts.js:20

  • Uncaught ParameterException: #06091847 chartobject-1 Warning >> A FusionChart oject with the specified id "myID" already exists. Renaming it to chartobject-1 FusionCharts.js:21

Any direction on this would be much appreciated.

Share this post


Link to post
Share on other sites

Hi,

 

any updates? fixes? 

 

I'm getting the error :

  1. Uncaught ParameterException: #06091847 chartobject-12 Warning >> A FusionChart oject with the specified id "ChartIdTN" already exists. Renaming it to chartobject-12 FusionCharts.js:19

 

 

 

Thanks

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Can you please try with attached sample?

 

The chart has been rendered using the latest version of FusionCharts XT i.e., FusionCharts XT v3.3.1 Service Release files.

 

Please find attached sample for your reference.

 

 

JS_Chart_Export.zip

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