Sign in to follow this  
Pedro Furst

Exporting charts with renderer javascript

Recommended Posts

Hi, 

 

I wonder if it is possible to export the chart renderer using javacript. I was able to export using flash renderer, but in my company no longer use this technology. 
 
When I try to export through javascript following error appears: 
 
Uncaught TypeError: Can not call method 'exportChart' of undefined FusionCharts.HC.js: 27787 
 
is trying to access the object 
chart.logic.chartInstance
 but chartinstance is undefined. We would like to use these charts exported in reports from the system.
 
 

 

example.jpg

 

post-62549-0-83509100-1394561803_thumb.jpg

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

It seems, the chart object instance is not getting accessed using "chart.logic.chartInstance".

 

Could you please replace the "chart.logic.chartInstance.exportChart()" with "FusionCharts("<provide your chart unique ID>").exportChart();" and see if it helps?

 

Ref. Code:

<script type="text/javascript">
  var myChart = new FusionCharts('FusionCharts/Column3D.swf', 'myChart', '900', '300', '0', '1');
  myChart.setXMLUrl('Data.xml');
  myChart.render('chartContainerDiv');
  FusionCharts('myChart').exportChart();//myChart is the chart ID provided as argument in the first line, while creating object instance
</script>

For more information on "Initiating from JavaScript", please refer the link: http://docs.fusioncharts.com/charts/contents/exporting-image/javascript-ref/ECJavaScript.html

 

Also, for more information on "Exporting Pure JavaScript Charts", please visit the link: http://docs.fusioncharts.com/charts/contents/exporting-image/ECPureJS.html

 

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
Sign in to follow this