kendo Report post Posted May 30, 2008 Hi, I've downloaded the evaluation version today and tried to create Pie3D chart with image downloadable option using jsp. The Pie3D chart can display and download successfully, but the downloaded image cannot open with image viewer program. Below is my development environment - JDK 1.5.0.15 - BEA weblogic 10 *** Note that I used original FusionChartsSave.jsp from folder ImageSaving *** The attached file is my generated HTML code Thanks, Ken myTestPieChart.txt Share this post Link to post Share on other sites
Pallav Report post Posted June 3, 2008 Hi Ken, Is the chart exporting as image on the first hand? Share this post Link to post Share on other sites
kendo Report post Posted June 3, 2008 Pallav (6/3/2008)Hi Ken, Is the chart exporting as image on the first hand? Hi, I'm not sure I understand what does "Is the chart exporting as image on the first hand?" mean, but here is the scenarios I've done with Made a http request to servlet. Created XML data and stored in session. Forwarded the request to jsp to display Pie3D chart using XML data in session. Pie3D chart was displayed successfully. Right clicked on the chart an selected "Save as image". Image was downloaded successfully. Opened the downloaded image with Windows Picture Viewer. Got message "No preview available". This is my development environment Windows XP JDK 5.0 BEA Weblogic 10 IE7 I also tested this in Firefox, but still got the same result. Thanks, Ken Share this post Link to post Share on other sites
FusionCharts Support Report post Posted June 3, 2008 Hi, Could you please make sure that the Image is being Downloaded Successfully at step 6? If you are using the original jsp image savinf script from the Download Pack, it would prompt to show/save the image. Share this post Link to post Share on other sites
kendo Report post Posted June 4, 2008 Sudipto Choudhury (6/3/2008)Hi,Could you please make sure that the Image is being Downloaded Successfully at step 6? If you are using the original jsp image savinf script from the Download Pack, it would prompt to show/save the image. Yes, the browser popup the dialog to show/sace image. I can download the image without problem (the download status bar was shown on the chart), but the downloaded image cannot display using image viewer program. Do I have to setup any additional configurations? Anyway, could you provide me the original saving script for JSP? I will compare it with the version I've downloaded Thanks, Ken Share this post Link to post Share on other sites
FusionCharts Support Report post Posted June 10, 2008 Hi, Coudl you please download the script from the Download Pack from www.fusioncharts.com/download.asp? Share this post Link to post Share on other sites
someuser88 Report post Posted October 8, 2008 (edited) I have same problem. The image is corrupt after saving. I'm using java 1.4.2 weblogic 8 and the downloaded script FusionChartsSave.jsp from the latest version. Edited October 8, 2008 by Guest Share this post Link to post Share on other sites
someuser88 Report post Posted October 9, 2008 (edited) It looks like a bug in FusionChartsSave.jsp, because the data is being sent in the request, but the created image file can't be opened in browsers or ms image viewer. Edited October 9, 2008 by Guest Share this post Link to post Share on other sites
someuser88 Report post Posted October 9, 2008 It looks like the .jsp is adding 5 new line characters at the start of the image file because of the imports, if I remove these new line characters, the image opens everywhere fine. I'm going to put the code from the jsp in a class to avoid this. Share this post Link to post Share on other sites
FusionCharts Support Report post Posted October 15, 2008 Hi All, Our developer would see to this and would have the fixes done soon. Share this post Link to post Share on other sites
srividya_sharma Report post Posted December 18, 2008 I have created a sample JSP application to save the chart as image. Please place the FusionCharts folder containing all the swf files and js files inside the web application before deploying. Hope this helps everybody. Srividya v3ImageExample.zip Share this post Link to post Share on other sites
srividya_sharma Report post Posted January 18, 2009 Here is the updated application which works for jdk 1.4 and above. Please place FusionCharts folder ( with js, swf files in it ) and deploy it. v3ImageExample.zip Share this post Link to post Share on other sites
sachin257 Report post Posted January 28, 2009 (edited) Dear Srividya, Excellent work. Thanks a lot. Now i can save all the chart images. Thanks once again. Keep in touch. Regds, Sachin.H Abu Dhabi. Edited January 28, 2009 by Guest Share this post Link to post Share on other sites
sachin257 Report post Posted January 28, 2009 Dear Srividya, I need to Save this images in my server only, when i hit the save button . Please help me. And also please send me the code to save the multiple charts as one single image(like attached sample image). Please help. Please refer the attachment for code. Regds, Sachin.H Share this post Link to post Share on other sites
srividya_sharma Report post Posted January 29, 2009 (edited) I have gone through the attached code. The javascript part seems to be ok. I assume that you have given the imageSave and imageSaveURL attributes in the xml. The last few lines of FusionChartsSave.jsp contains the following code to stream the image output: OutputStream os = response.getOutputStream(); ImageIO.write(chart, "jpeg", os); os.close(); Please change these lines to save the image on the server. Use FileOutputStream to write to the file. I expect that this will do the job! Edited January 29, 2009 by Guest Share this post Link to post Share on other sites
sachin257 Report post Posted January 29, 2009 Dear Srividya, Thanks for the reply. I tried as you said like below, File f=new File("FusionCharts_Evaluation/Temp_Image/"+sdf.format(today)+".png"); ImageIO.write(chart,"png",f); Need some more help 1. The image is created. but, how i can pass the image name('101208.jpg') from (ExportChart.jsp to FusionChartsSave.jsp) 2. If i hitting the save button in ExportChart.jsp is redirecting to FusionChartsSave.jsp to save the image. Can u please help me to save the image with in the ExportChart.jsp only to save the image in my server. 3. How i can save these four charts(ExportChart.jsp) as one single image. Please help me. Regds, Sachin.H Share this post Link to post Share on other sites
Rahul Kumar Report post Posted January 29, 2009 (edited) Hi, For 1 and 2nd please see this: 1. You could not pass file name to FusionChartsSave.jsp. Otherwise you would need to include your file name in the query string of imageSaveURL, like the following: a. imageSaveURL="{path}/FusionChartsSave.jsp?filename=MSColumn2D.png&refurl={path to exportchart.jsp}" for MSColumn2D.xml b. imageSaveURL="{path}/FusionChartsSave.jsp?filename=MSLine.png&refurl={path to exportchart.jsp}" for MSLine.xml c. imageSaveURL="{path}/FusionChartsSave.jsp?filename=MSArea2D.png&refurl={path to exportchart.jsp}" for MSArea2D.xml d. imageSaveURL="{path}/FusionChartsSave.jsp?filename=Pie2D.png&refurl={path to exportchart.jsp}" for Pie2D.xml and after that need to modify FusionChartsSave.jsp as follow: File F=new File("/{path}/"+request.getParameter("filename")); Also at the end please append this (just after chart=null); response.sendRedirect(request.getParameter("refurl")); 2. and 3. is not possible as of now. Edited January 29, 2009 by Guest Share this post Link to post Share on other sites
sachin257 Report post Posted January 29, 2009 Dear Friend, It is working fine.Thanks a lot. Regds, Sachin.H Share this post Link to post Share on other sites
sachin257 Report post Posted January 29, 2009 (edited) Dear Rahul, 1. Is it possible to remove the background color of attached chart image(Column3D.png),becaz i am not able to see the background image. 2. Need to bring into background image(google image) into center position, in the attached chart image(MSColumn3D.png) Please refer the xml files for above charts. Please help me if possible send me the codes. Regds, Sachin.H Edited January 29, 2009 by Guest Share this post Link to post Share on other sites
Rahul Kumar Report post Posted January 29, 2009 Hi, You would need to make chart transparent, and also, need to use bgalpha='0' in the XML in <chart> element. Please download the attached file, I have added a new parameter to createChart function, i.e. setTransparent, use it as follows: String chartCode= createChart("../../FusionCharts/Pie3D.swf", strDataURL, "", "FactorySum", 600, 300, false, false,true); also in the XML's [chart ] element, please add bgAlpha='0'. FusionCharts.zip Share this post Link to post Share on other sites
srividya_sharma Report post Posted January 31, 2009 In order to remove the background of the canvas and retain the chart background, please add showCanvasBg='0' to the chart tag. Share this post Link to post Share on other sites
sachin257 Report post Posted January 31, 2009 Hi Vidya, 1.Can we add Y axis(Line) in Chart Column3D (Column3D.png) 2.Is it possible to fill the bright color in MSColumn3D Chart(MSColumn3D.png),becaz, the color is starting from light to bright. Regds, Sachin.H Share this post Link to post Share on other sites
srividya_sharma Report post Posted February 1, 2009 (edited) For a solid background color with no gradient, use bgColor attribute in chart element. That should help in achieving your requirement. Edited April 6, 2009 by Guest Share this post Link to post Share on other sites
sachin257 Report post Posted February 2, 2009 (edited) Dear Vidya, I tried using vLine color='FF5904' thickness='2', but still i am not getting the Y-Axis. Please refer the attachment image & xml, I need to draw the Line which is highlighted in red color with in the circle . Please help. Regds, Sachin.H Edited February 2, 2009 by Guest Share this post Link to post Share on other sites
Rahul Kumar Report post Posted March 25, 2009 Hi, I am afraid, it is not possible to add Y-Axis even if you are using VLINE, as of now. Share this post Link to post Share on other sites