Sign in to follow this  

Problem Exporting Chart As Image

Recommended Posts



I have JSP pages that get XMLString dynamically from the back end java classes that load the data for the charts from the DB, and generate XML on-the-fly. The chart itself is not loaded in the main page, but in in the div that is loaded with ajax after all the data for the chart is received from DB. The chart data is refreshed every 3 minutes.


What happens most of the times (sometimes the image is saved properly for some charts) when I try to save as JPG (or other save options) is the following:



1 - Capturing Data goes to 100%

2 - I get a file Download dialog for saving an HTML file. The filename is always FCExporter(somtimes +SomeRandomNumber).htm

3 - If I click open on the dialog, this URL opens: http://localhost:8080/Pulse/FCExporter

4 - Here is what is displayed in the browser:


statusMessage= Width/height not provided. Insufficient data.Background Color not specified. Taking White (FFFFFF) as default background color.





Here is an example of the JSP div that gets loaded after the data is received from back-end and injected into the XML:


 <%!String regionXMLDataString;%>
<%regionXMLDataString = (new RegionPieChartDataBuilder()).getChartXML(request.getParameter("transactionID"));%> 
<fc:render chartId="RegionPie"
swfFilename="Charts/FusionCharts/Pie2D.swf" width="350
height="300" debugMode="false" registerWithJS="true"
xmlData="<%= regionXMLDataString %>" 


Here is the XML example for the chart:


<chart caption='Failure Rate by Region' exportEnabled='1' exportHandler='FCExporter' >
<set color='5BAD5B' label='N East' value='0'/>
<set color='B00000' label='West' value='5'/>
<set color='57517B' label='East' value='8'/>


And here is my properties configuration:






And I have the fcexporthandler.jar and fcexporter.jar in my lib folder.


Also, here is what I am getting in the system log file:

Mar 1, 2012 6:23:52 PM com.fusioncharts.exporter.error.ErrorHandler buildResponse
INFO: Notices
Mar 1, 2012 6:23:52 PM com.fusioncharts.exporter.error.ErrorHandler buildResponse
INFO: Miscellaneous Messages=<BR>width=0<BR>height=0<BR>DOMId=null


Thanks in advance for your help.

Edited by Lana

Share this post

Link to post
Share on other sites
Guest Sumedh



We are looking into it.


We will update you on this very soon.


Thanks for your time .

Share this post

Link to post
Share on other sites
Guest Bindhu



Thank you for the post.


I do not see anything wrong with your code.


Please find attached a sample demo code, see if this helps !


Also, for more details on 'Exporting Charts as PDF or Images', please refer to the link below,


See section "Exporting as Image/PDF".


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