Starting v3.0.5, FusionCharts can export charts as images. To export a chart as image, all you need to do is configure the setup using code provided by us and then right click on chart and select Save as Image.

This is done using a combination of FusionCharts and server side scripting, as Flash Player doesn't support exporting to images natively. The following processes take place when the chart is to be exported as image:

  1. First, the chart renders at client side using the XML data provided. In the XML data, you configure whether the chart would allow exporting of images. If yes, you can configure the script path and few cosmetic properties.
  2. When the user right clicks on the chart and selects "Save as Image", the chart takes a snapshot of itself, compresses it and sends to the specified server side script.
  3. The server side scripts reads this data, decompresses it, builds an image and returns it.

In the download package, we've provided server side script for image saving in 5 languages - ASP.NET, PHP, JSP, ColdFusion and Perl, as all these technologies natively support server side image generation. If you intend to use PHP, you need to make sure that GD is installed and enabled. You can implement these scripts in other languages too using help of third party image generation components.

In the next section, we'll see how to set it up.