Jump to content


Exporting Charts As Images/pdf


  • Please log in to reply
2 replies to this topic

#1 OMMPAVAN

OMMPAVAN

    Advanced Member

  • Members
  • PipPipPipPip
  • 50 posts

Posted 18 July 2012 - 09:20 AM

hai i have added exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' exportFileName='FusionReport attributes to my chart tag then now can see the save as jpeg,png labels .after clicking on that it is showing capturing data after it has to show save button as in examples provided in docs but that save button is not showing to me .have to use any other swf file or where is my mistake

#2 OMMPAVAN

OMMPAVAN

    Advanced Member

  • Members
  • PipPipPipPip
  • 50 posts

Posted 18 July 2012 - 09:37 AM

Can u provide sample example of saving as image . i am unable to see Export chart little icon too .What still i have to do

String dataXMl= <chart exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' exportFileName='FusionReport' >.......</chart>

-------------------------------fusionchart.jsp


<div id='<%=chartId%>Div' align='center'>Chart</div>
<div id='<%=chartId%>Div1' align='center'></div>
<script type='text/javascript'>
var chart_<%=chartId%> = new FusionCharts("<%=chartSWF%>", "<%=chartId%>","<%=chartWidthStr%>"
,"<%=chartHeightStr%>", "<%=debugModeInt%>", '1');

<%if (strXML.equals("")) {%>
//<!-- Set the dataURL of the chart-->
chart_<%=chartId%>.setDataURL("<%=strURL%>");

<%} else {%>
// Provide entire XML data using dataXML method
chart_<%=chartId%>.setDataXML("<%=strXML%>");
<%}%>


/* FusionCharts.setCurrentRenderer('javascript'); This line will force fully render chart in javascript mode*/
chart_<%=chartId%>.configure("PBarLoadingText", "Loading Chart. Please Wait.....");
chart_<%=chartId%>.configure("XMLLoadingText" , "Loading Chart. Please Wait.....");
chart_<%=chartId%>.configure("InvalidXMLText", "Invalid Data ");
chart_<%=chartId%>.configure("ChartNoDataText", "No Current Records To Display");
//<!-- Finally, render the chart.-->
chart_<%=chartId%>.render("<%=chartId%>Div");


var myExportComponent = new FusionChartsExportObject("fcExporter1", "FCExporter.swf");

myExportComponent.render("<%=chartId%>Div1");

Edited by OMMPAVAN, 18 July 2012 - 09:59 AM.


#3 Bindhu

Bindhu

    Supreme Being

  • Members
  • PipPipPipPipPipPipPipPip
  • 748 posts
  • LocationBangalore

Posted 20 July 2012 - 06:46 AM

Hi,

Can you please let us know if you are trying to run the sample on a local machine?

If yes, then I am afraid, on local files system, Adobe Flash Player blocks Flash to JavaScript communication on local file system for security reasons, which FusionCharts uses for Client-side exporting.

If you need to over-ride that for a specific folder, you will need to visit http://www.macromedi..._manager04.html and then in that interface add the folder containing our examples to the list of allowed folder.

Or try running it from a server.

Also, please make sure you have done the following while exporting a chart:
1. You have defined the correct Client-side Export Handler's ID in the data (XML/JSON) of the chart
2. You have passed the correct Client-side Export Handler's ID while calling the exportChart() function
3. Flash Player 10 or above is installed in the system
4. You have Flash Player Global Security settings configured to run the samples from local file system.

Please note:
During export of the pure JavaScript charts, the chart data is sent to external servers for processing and converting to image.

User must have an active internet connection for this feature to work. In case you want to process the exported data on your own server, you may setup the chart to send the data to your own server.

For more details, please refer to the link below,
http://docs.fusioncharts.com/charts/contents/?exporting-image/ECPureJS.html

Hope this helps!

Edited by Bindhu, 20 July 2012 - 06:49 AM.

Help us improve our documentation with your precious feedback at:
[url]http://documentation-survey.g.fusioncharts.com/[/url]

Thank you,
Bindhu

Follow us <[url]http://http//twitter.com/fusioncharts>[/url] @Twitter!