You are viewing documentation for an older version. For current documentation - click here.

The export process, when using Server-side Export Handlers, can be visualized as under:

As shown above, when exporting the charts as images/PDFs using Server-side Export Handlers, there are two actions that you can choose from:

  1. Download to end user - Return the generated image/PDF back to the client (browser) for downloading
  2. Save on server disk - Save the image on server-disk and return the URL of the same to callback JavaScript functions

Please note that in both cases, the chart first needs to render in a browser, before the bitmap snapshot can be sent to server for processing. You cannot directly generate an image of chart on server, without actually rendering it in browser.

Elements involved

For enabling export of chart at Server-side, we will need to assemble the following elements:

  • The chart itself embedded using FusionCharts JavaScript class (FusionCharts.js). Here, we assume that you have been able to generate the chart for your page. If not, please refer to the relevant section of our documentation.
  • FusionCharts Export Handlers (Server-side) - In case of Server-side export, these Server-side scripts accept and convert the bitmap snapshot of charts into images/PDFs. We have provided ready-to-use Server-side Export Handlers in multiple programming languages like ASP.NET, PHP, J2EE and Ruby on Rails. Depending on what technology you are using, you can copy-paste the relevant files from Download Package > ExportHandlers folder to your web server.

So let us quickly get started and setup a simple example that exports the chart as an image and sends it back to browser (for the user to save).