maria Report post Posted September 4, 2009 Hi, I followed the instructions for server-side saving of charts to PDF and JPEG. I can successfully right-click and see the "save as" options, the the progress bar appears. However, the download dialog box never appears so I can't really save the chart. Instead the webpage loads the contents of FusionCharts/ExportHandlers/PHP/ I must be going wrong somewhere. The code snippet looks like this: < ... exportAtClient='0' exportAction='download' exportEnabled='1' exportHandler='http://powernet.stanford.edu/FusionCharts/ExportHandlers/PHP' ...> Thank you. M Share this post Link to post Share on other sites
Guest Madhumita Report post Posted September 5, 2009 Hi, Could you please try using Flash Player 10 for this. Looking forward to your feedback on this. Share this post Link to post Share on other sites
maria Report post Posted September 5, 2009 Yeah, it is Flash Player 10. I've tried Safari on MacOS, Shiritoko (new Firefox) and Chrome (on Ubuntu) Thanks. Share this post Link to post Share on other sites
maria Report post Posted September 6, 2009 Anyone, please? Share this post Link to post Share on other sites
Guest Madhumita Report post Posted September 7, 2009 Hello Maria, Can you please check and see if the global security setting is set? Please refer to the following forum link: http://www.fusioncharts.com/forum/Topic5009-47-1.aspx#bm8077 Hope this helps you. Share this post Link to post Share on other sites
saptarshi Report post Posted September 7, 2009 Maria, You need to render the chart at least once at the client end (in a browser) before you can export it at the server side. You cannot directly export the chart at the server side without rendering it at the client end first. If you are already doing that the there are a couple of things you need to check: 1) Whether you are using the latest version 3.1.1 of the SWFs and FusionChartsExportComponent.js (you can enable the debug mode to check your version) 2) Whether you have the Flash Player Global settings enabled as Madhumita has already pointed out. If none of these help, just send us the code you are using and we will try to see what could be causing the problem. Share this post Link to post Share on other sites
maria Report post Posted September 7, 2009 Hi, thanks for the suggestions. I double checked my Flash Player settings and the version (3.1.1) of the files. As far as the FusionChartsExportComponent.js is concerned, I am not sure what that is. I never saw anything about it in the documentation. I traced it in the source code and added it to my code but that didn't change anything. I am attaching three files: energy-watts2 contains some data plot-monitor.php reads the data file and generates the XML string monitor.php renders the chart (note that i had trouble opening this file in TexEdit but vim or cat works just fine) The two php files are attached as .txt so they need to be renamed. The datafile needs to have the .txt extension completely removed. It must be something silly but I just don't see it. Many thanks. energy-watts2.txt monitor.txt plot-monitor.txt Share this post Link to post Share on other sites
maria Report post Posted September 9, 2009 Has anyone been able to run the attached files and export the graph to either JPEG or PDF? Many thanks. Maria Share this post Link to post Share on other sites
maria Report post Posted September 14, 2009 Would anyone be kind enough to at least ACK or NACK whether they can successfully export charts give the code attached in the earlier post? I will really appreciate it. Best, Maria Share this post Link to post Share on other sites
saptarshi Report post Posted September 14, 2009 Hi Maria, We are currently looking into this issue. Share this post Link to post Share on other sites
Guest Rajroop Report post Posted September 14, 2009 Hello Maria, I apologize for the delay in the reply. :crying: Could you please use the following attachment in place of plot-monitor.txt that you have attached to one of your earlies posts, and try again? After testing in our Labs, we found out that the change that was needed to make it work was in the following line of code: exportHandler='FusionCharts/ExportHandlers/PHP/FCExporter.php'"; Please comment on whether this was helpful or otherwise. I do really hope this helps. Sample1.txt Share this post Link to post Share on other sites
maria Report post Posted September 14, 2009 Hi, Thanks for helping out. Making the suggested changes allows me to export the chart to PDF successfully. Yay! Exporting to JPEG or PNG fails with the following error: Fatal error: Call to undefined function imagecreatetruecolor() in /var/www/FusionCharts/ExportHandlers/PHP/Resources/FCExporter_IMG.php on line 261 Maria Share this post Link to post Share on other sites
Guest Madhumita Report post Posted September 17, 2009 Hi Maria, Glad that we could help you. Happy FusionCharting. Share this post Link to post Share on other sites
Guest Rajroop Report post Posted September 17, 2009 Hello, Could you please add the following lines of code in your JS code and try again? <-------------------------JPEG-----------------------------> function FC_Rendered(DOMId) { var chart = getChartFromId(DOMId); chart.exportChart({ exportFormat:'jpeg' }); } <------------------------PNG--------------------------------> function FC_Rendered(DOMId) { var chart = getChartFromId(DOMId); chart.exportChart({ exportFormat:'png' }); } I hope this helps. Share this post Link to post Share on other sites
maria Report post Posted September 19, 2009 Hi, Thanks for the reply. Does this go in my custom code or in one of the support files provided by the Fusion Charts library? Best, Maria Share this post Link to post Share on other sites
Guest Madhumita Report post Posted September 21, 2009 Hi Maria, The code provided should be incorporated in your custom JS code. Ref.- http://www.fusioncharts.com/docs/Contents/JS_Example.html You can go through the above link which contains a similar example where the FC_Rendered() is used. Hope this helps. Share this post Link to post Share on other sites