Forum Stats

  • 3,827,605 Users
  • 2,260,798 Discussions


How to save APEX4.2 Chart to image file automatically


I have created two flash charts ( namely "Chart1" and "Chart2") on a single APEX page (version 4.2).  Each chart needs to be saved as a separate image file ( *.PNG ) to a fixed directory  of user's PC ( e.g. P:\APEX_Charts\).

Is there a way to achieve the following

(1) The file name should be called "Chart1.png" or "Chart2.png" ( instead of the default Anychart.png)

(2) The two charts can be saved automatically using the names from (1), as soon as the user clicks on a button ( which invokes dynamic action).

How to achieve this auto-save functionality without manually right clicking on the individual chart then choosing the "Save as Image" option ?

To start with, I tried to save the Chart1 first,  I put the following code in the APEX dynamic action ( "Exceute JavaScript Code" )  asscociated to the button click.

          var chart_to_be_saved = AnyChart.getChartById($("#Chart1 object").attr("id"));


          function() { saveChartAsImage(chart_to_be_saved);};


But it didn't work.  I received error message : "'null' is null or not an object ..... ) .  How to fix this ?

Thanks for your advice.


This discussion has been closed.