Sign in to follow this  
srividya_sharma

IN JSP,can fusioncharts v3.1 save chart as image to client side?

Recommended Posts

Hi

To get the export feature working on client side, you would have to do the following:

1. Include the following js files in your page ( correct the path as per your directory structure )

<head>
   <script language="JavaScript" src="../../FusionCharts/FusionCharts.js"></script>
<script language="JavaScript" src="../../FusionCharts/FusionChartsExportComponent.js"></script>
</head>

2. Create a div for the export component

<!-- We also create a DIV to contain the FusionCharts client-side exporter component -->
<div id="fcexpDiv" align="center">FusionCharts Export Handler Component</div>

3. Render the export component

<script type="text/javascript">
//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", "../../FusionCharts/FCExporter.swf");
//Render the exporter SWF in our DIV fcexpDiv
myExportComponent.Render("fcexpDiv");

4. Change the export related attributes in the xml

exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1'

That's it! You are ready to go.

For detailed instructions please see, http://www.fusioncharts.com/Docs/Contents/ECClientSimple.html

Hope this helps! :)

Srividya

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