Sign in to follow this  
Guest Basundhara Ghosal

Exporting Image/PDF using Client Side JavaScript

Recommended Posts

I created a Chart example from the FusionCharts v3 documentation.

The chart can render fine.  When trying to add the export as a PDF/Image as in the documentation, I have problems.

  • The chart renders
  • I can right mouse and get the options to Save As a JPG/PNG/PDF
  • Upon click I get a capturing data box that reaches 100%
  • Nothing happens, no Save As window.
  • The Save Div button just says Waiting the whole time.

Is it possible to do this without ASP or PHP?  Straight from Flash/HTML/JavaScript?

MORE DETAILS:

Including : FusionCharts.js, FusionChartsExportComponent.js

Chart Parameters: exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' showExportDataMenuItem='1'

 <div id="chart1div" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div><div id="fcexpDiv" align="center">FusionCharts Export Handler Component</div><script type="text/javascript">   	var myChart1 = new FusionCharts("/rptmgr/FusionCharts/Line.swf", "myChart1Id", "600", "500", "0", "0");	myChart1.setDataXML ("<chart yAxisName='Sales Figure' caption='Top 5 Sales Person' numberPrefix='$' useRoundEdges='1' bgColor='FFFFFF,FFFFFF' showBorder='0' exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' showExportDataMenuItem='1'>	<set label='2008-2009' value='222' />	<set label='2009-2010' value='666' />	<set label='2010-2011' value='654' />	</chart>");   	myChart1.render("chart1div");</script>   <script type="text/javascript"> 	//Render the export component in this     	//Note: fcExporter1 is the DOM ID of the DIV and should be specified as value of exportHandler      	//attribute of chart XML.      	var myExportComponent = new FusionChartsExportObject("fcExporter1", "/rptmgr/FusionCharts/FCExporter.swf");	myExportComponent.debugMode = true;	//Render the exporter SWF in our DIV fcexpDiv      	myExportComponent.Render("fcexpDiv");   </script>

Any info would be much appreciated! Thank you
Edited by Guest

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Welcome to FusionCharts forum. :)

Please try enabling the attribute 'RegisterWithJS'.

Ref.- var myChart1 = new FusionCharts("/rptmgr/FusionCharts/Line.swf", "myChart1Id", "600", "500", "0", "1");

Also, please confirm that the version of the Flash Player that you are using is 10.

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