MartinS Report post Posted October 29, 2010 I have been asked to see if, after selecting one of the export options from the right-click menu, i.e. Save as JPG, Save as PNG etc... whether there is a way for it to automatically show a Save As dialog once the chart image has been generated? The examples all seem to show a Save button or some sort of user interaction for this to work. If I right-click and Save as JPG, it captures data, then does nothing. Thanks Martin Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted October 29, 2010 Hi Martin, Please try calling the export function on calling the FCRender() function. Ref.- <script type="text/javascript"> function FC_Rendered(DOMId) { if (FusionCharts(DOMId).exportChart) { // you can change the value of exportFormat to 'PNG' or 'PDF' FusionCharts(DOMId).exportChart({ "exportFormat": 'JPG' }); } } </script> I hope this helps. Share this post Link to post Share on other sites
MartinS Report post Posted October 29, 2010 Hi No, sorry, doesn't seem to work. I just get 'waiting' after the image has been created. This is the code I have in my page: <script language="javascript" type="text/javascript"> //This event is raised when the chart has finished capture phase and passed the data to //Export Component for further processing function FC_ExportReady(DOMId) { // create export object... var myExportComponent = new FusionChartsExportObject("fcExporter1", "FusionCharts/FCExporter.swf"); // render the exporter SWF in dummy DIV... myExportComponent.Render("fcExportDiv"); } function FC_Rendered(DOMId) { if (FusionCharts(DOMId).exportChart) { // you can change the value of exportFormat to 'PNG' or 'PDF' FusionCharts(DOMId).exportChart({ "exportFormat": 'JPG' }); } } </script> I right click on the chart and select 'Save as JPEG Image', it shows the Capturing data dialog, and at 100%, I get a greyed out 'waiting' area where I inserted my fcExportDiv div. Thanks Martin Hi Martin, Please try calling the export function on calling the FCRender() function. Ref.- <script type="text/javascript"> function FC_Rendered(DOMId) { if (FusionCharts(DOMId).exportChart) { // you can change the value of exportFormat to 'PNG' or 'PDF' FusionCharts(DOMId).exportChart({ "exportFormat": 'JPG' }); } } </script> I hope this helps. Share this post Link to post Share on other sites
MartinS Report post Posted October 29, 2010 And even with the ExportReady removed, it now doesn't show the Waiting, but still does nothing. Do I need to set anything else, say in the chart attributes, to show the dialog? Thanks Martin Hi No, sorry, doesn't seem to work. I just get 'waiting' after the image has been created. This is the code I have in my page: <script language="javascript" type="text/javascript"> //This event is raised when the chart has finished capture phase and passed the data to //Export Component for further processing function FC_ExportReady(DOMId) { // create export object... var myExportComponent = new FusionChartsExportObject("fcExporter1", "FusionCharts/FCExporter.swf"); // render the exporter SWF in dummy DIV... myExportComponent.Render("fcExportDiv"); } function FC_Rendered(DOMId) { if (FusionCharts(DOMId).exportChart) { // you can change the value of exportFormat to 'PNG' or 'PDF' FusionCharts(DOMId).exportChart({ "exportFormat": 'JPG' }); } } </script> I right click on the chart and select 'Save as JPEG Image', it shows the Capturing data dialog, and at 100%, I get a greyed out 'waiting' area where I inserted my fcExportDiv div. Thanks Martin Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted October 29, 2010 Hi Martin, Could you please confirm the following:- 1) Whether you wish your chart to save directly as image/PDF as soon as it renders on the browser page? 2) The name of the server-side scripting language, in case you are using one. Awaiting your reply. Share this post Link to post Share on other sites
MartinS Report post Posted October 29, 2010 (edited) Hi Yes, that was my logic - they do not want the user to have to click a buton after 'Save as JPEG', only a save button on a Save As dialog. This is a C# web application (.net 3.5), so apart from the calls to the js files, there is no other scripting language. I am using an AJAX updatepanel around the chart. Thanks Martin Hi Martin, Could you please confirm the following:- 1) Whether you wish your chart to save directly as image/PDF as soon as it renders on the browser page? 2) The name of the server-side scripting language, in case you are using one. Awaiting your reply. Edited October 29, 2010 by MartinS Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted October 29, 2010 Hi Martin, Please refer to the "Export" folder of the FusionCharts latest pack(v 3.2) for the same. Ref.- FusionCharts_Pack --> Code --> CS --> Export I hope this helps. Share this post Link to post Share on other sites