Ganesh Report post Posted February 27, 2008 (edited) We are trying to generate a JPEG image using the latest trial download (V3.0.6), but we are finding that image is getting saved in the server side we are using the JSP (FusionChartsSave.jsp). The saved file size is 69 KB. But we are not able to do preview or open it in the paint (it gives an error message Paint cannot read this file). Is there any encoding that we need to do? Please find the javascript code that we have used below. Any inputs on what could be the reason for file corruption would be great. <script language="JavaScript"> var sdrDivChart = new FusionCharts("Column2D.swf", "sdrDivID", "600", "400", "0", "1"); <!--Initialize graph with chart data returned by generateXMLforSDR() function. [ note: the parameter 'this.document.productSelector.AnimateChart.checked' is passed to set animation property of the chart] //loading XML data into variable strXML --> var strXML=generateXMLforSDR(); alert(strXML); sdrDivChart.setDataXML(strXML); sdrDivChart.render("sdrDiv"); </script> <BR /> <center><input type='button' value='Save Chart as Image' onClick='javascript:saveChart();'></center> <SCRIPT LANGUAGE="JavaScript"> function saveChart(){ //Get chart from its ID var chartToPrint = getChartFromId("sdrDivID"); alert("Before SaveASImage Method"); chartToPrint.saveAsImage(); alert("After SaveASImage Method"); } </SCRIPT> Edited February 27, 2008 by Guest Share this post Link to post Share on other sites
FusionCharts Support Report post Posted February 28, 2008 hi, FusionChartsSave.jsp resends the image back after generating as jpeg image to the client, unless you code it to save in serverside. Here in out lab we do nto have any constrain opening the image in paint. Share this post Link to post Share on other sites
Ganesh Report post Posted February 28, 2008 Does this work for the all kinds of graph is there any restriction on the type of graph? Like Area Graph and Stacked bar and others? From the code it looks like the graph is re-generated back in the server side once again. Share this post Link to post Share on other sites
Pallav Report post Posted February 28, 2008 You can use it with any v3 chart. Yes - the image is regenerated at server side. Share this post Link to post Share on other sites