FusionCharts Forum: Exporting Image/PDF using Client Side JavaScript - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Exporting Image/PDF using Client Side JavaScript

#1 User is offline   kevham 

  • Forum Newbie
  • Group: Members
  • Posts: 2
  • Joined: 28-July 10

Posted 28 July 2010 - 03:33 PM

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

0

Other Replies To This Topic

#2 User is offline   Basundhara Ghosal 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2459
  • Joined: 15-September 09

Posted 28 July 2010 - 11:26 PM

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. :)

Regards,

Basundhara Ghosal

Follow us on Twitter :D
0

Other Replies To This Topic

#3 User is offline   kevham 

  • Forum Newbie
  • Group: Members
  • Posts: 2
  • Joined: 28-July 10

Posted 29 July 2010 - 11:28 AM

That worked! Thank you very much!
0

Other Replies To This Topic

#4 User is offline   Sanjukta 

  • Supreme Being
  • Group: Administrators
  • Posts: 1664
  • Joined: 15-March 10

Posted 30 July 2010 - 12:38 AM

Hi,

You are welcome. :)

Glad that your issue is resolved.

Happy FusionCharting! :)

Help us improve our documentation with your precious feedback at:
http://documentation...sioncharts.com/

Thanks,
Sanjukta

Follow us @Twitter!
0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic