How often does this happen to you – you create a stunning information-intensive chart after a lot of hard work for your web page and then intend to embed the same in your annual report? Or mail it to one of your colleagues? But since you have no easy way to export the chart from the web page, you have to create the chart all over again. What if all of that could be done as simply as in the screenshot below?

SAI_SaveAsImage

Yes, with FusionCharts Suite XT, you can do it with one single click. Any chart in FusionCharts v3.1 can be configured to be exported as an image (JPEG or PNG) or a PDF file by the end user. This can be done either on the server-side or on the client-side. Before we get into slightly technical details of the same, here’s a live demo of the same that you might want to see to get a better grasp of things. Now, FusionCharts by itself cannot directly export the charts as images. It needs help either from server-side scripts, or other client side Flash movies (coded in Flash 10) to accept the bitmap snapshot sent by FusionCharts, and to convert that into an image or PDF. These are called FusionCharts Export Handlers. The export handlers come in 2 flavors: Server-side Handlers & Client-side Handlers. Let’s look into each of them in details.

Server-side Export Handlers

The server-side export handlers help you export FusionCharts as images/PDF with the help of scripts that are placed on your servers. We provide ready-to-use scripts for ASP.NET, PHP (uses GD and GZIP library), Ruby on Rails (uses RMagick and zlib) and Java in our Download pack itself. These scripts accept compressed bitmap data from FusionCharts (over HTTP or HTTPS) and convert the same into images/PDFs. Post conversion, you’ve two options:
  • Save the generated output (image/PDF) on the server’s disk. This allows you to use these images later for embedding in your emails/reports.
  • Or, send it back to the browser so that your user can download it.

Client-side Export Handlers

The client-side FusionCharts Export Component, as the name suggests, helps you bypass all server scripts and save the charts as images/PDFs at the client side itself. You would typically use client-side export when your server doesn’t support any of the technologies mentioned in server-side exporting or you don’t want to transfer data between your client and server (which in turn will make the export process faster). Client-side exporting is done using FusionCharts Export Component SWF file (which is coded in Flash 10) and FusionCharts Export Javascript class, both of which are available in the Download pack. In both client and server side exports, you can configure the output formats(PDF/JPEG/PNG) that you wish to make available from your context menu and the cosmetics of the export dialog box itself. You can also make your own custom export panels (with custom buttons, look & feel) somewhere near the chart in a <DIV> and then connect the same to the export handlers of the charts.

Batch Export

Let’s say you have multiple charts on a page and you want to export all of them with a single click. In comes batch export. You can make use of batch export when you are exporting charts on the client-side. The exported files for each chart can either be saved individually, or all the exported charts can be saved as a single file:

ECBatchSetup1

Batch Export can thus be made use of extensively in reporting purposes and dashboards, where the user can save any chart and use it later in reports/emails. To get details on how to implement either server or client side (including Batch export) exporting for your charts, please check out the Exporting as Image/PDF section in our online documentation. In this post, we talked about the feature in FusionCharts v3.1 specifically, but it applies equally well to FusionWidgets, FusionMaps and PowerCharts v3.1 as well. With this blog post, we start our promised series of an in-depth look at the new features of v3.1. Once you know the features inside out, you can use them to render a powerful charting experience. So keep coming back for more…

Take your data visualization to a whole new level

From column to donut and radar to gantt, FusionCharts provides with over 100+ interactive charts & 2,000+ data-driven maps to make your dashboards and reports more insightful

Explore FusionCharts

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

29 responses on “Export your charts as images or PDFs

  1. Python users can grab server-side export code here:
    https://bitbucket.org/schmichael/python-fusioncharts/
    There’s code for Django and a custom CherryPy based Python web framework.
    The client-side export code doesn’t work for me in Ubuntu 9.04.

  2. Hello,
    is it possible in Fusionchart-Free to export in PDF or just for V3-1

  3. Hi Jason,
    I am afraid, export to PDF (or any other export feature) is not available in FusionCharts Free.
    You need to use FusionCharts v3.1 or above to avail the Export to JOG/PNG/PDF feature.

  4. While saving as images at server-side, I am getting applet alerts. Hoe to disable these alerts??

  5. Sudipto,
    You should fix this page:
    https://www.fusioncharts.com/free/docs/Contents/v3vsFree.html
    It says:
    Export Chart as Image/PDF
    FusionCharts v3: No
    FusionCharts Free: Server-side and client-side export to JPG, PNG and PDF
    I believe it’s other way around. I wish it is the way it says it is! 🙂

  6. @Parxier: Done. Thanks a lot for pointing it out. And sorry we could not grant your wishes here 🙂

  7. Hi,
    Would I need batch export in order to export the chart and its grid on the same file ?
    If so, am I obliged to user client-side export ?
    I’ve already implemented chart server-side export, and it works fine, until I found out the chart legend (namely the grid) is not found on the exported pdf.
    Thanks

  8. @Ranc2: I am afraid grid does not support export feature. As of now batch export is supported at client side until and unless you take some time to modify the export handler code to reopen existing exported image/PDF file (at server) and keep on appending the new images to it.

  9. Hi,
    About batch export. Is there a way to generate the graphs on the server-side by a periodic process started on the server by a timer to send them?

  10. Hi,
    Any one know how to export the scroll charts in jpg
    waiting for reply

  11. if v click export n click on other tab it wont get camptured in mozilla

  12. How to find out the version of the fusion chart in use.

  13. Hi,
    The version of my fusion chart is 3.0.6.
    am I able to do a server-side export?
    Thanks.

  14. @izzy: Nope, but you can upgrade to v3.1 and use server-side export.

  15. Exporting the scrollable charts in full has come in to picture now or still in cards.
    If this functionality is available now, do me a favour by sending the link where I can find more about that particular feature.
    Thanks in advance.

  16. Is it possible to export charts using fusion charts free?

  17. Are there any options available for adjusting the quality of the images created via the export process?

  18. Hi,
      I am exporting fusion charts by saving in some [available ex: pdf ] format . Even though i disabled some graphs of chart by using legend after exporting i am getting the full chart.

    How to export the chart with some of the graphs disabled.i.e by using legends.??
    Please help me.

    Thanks,
    –kasiredd. 

    • Hi,

      It is possible to export the current state of the chart rendered both in Flash/JavaScript mode.

      Please Note: Starting FusionCharts XT SR5, JavaScript charts can export the current state of the charts.

      If the issue is not resolved, please send us the sample code to “[email protected]

  19. I have 6 charts rendered in a page. I am calling exportChart function on click of a button. The charts start capturing images only if it is visible. So every time I need to scroll down to save the below charts. What would be the reason. I am stuck with this. Waiting for a reply

  20. Hi Aneesh,
     
    Since Flash charts depend on the Flash player, the charts has to be rendered in the viewable area for exporting. To render the charts in the non view-able area, we have created workaround.
    “scroll.js” has been created internally which helps you to render the charts in non-viewable area and helps in Batch Exporting of all the charts.
    If you require the same, please drop a mail to <[email protected]>.

  21. Does the export function work on a windows web server?

  22. Hi,
    How to export the multiple charts at a time and some of them are not visible in screen ( Those will visible if we scroll down )