Configuring Export Feature

The export feature of FusionCharts XT can be enabled by setting the value of exportEnabled to 1. The export button will now appear on the top right corner of the chart. An image of the button can be seen as follows:

image

Name Description
exportEnabled This attribute gives you the option to allow exporting to images/PDFs.


Clicking the export button will display the export menu, which contains a list of all the possible formats the chart can be exported to.

image


A number of other features can also be configured like the name of the exported file and the display text for each format that is supported. A chart with these options configured can be seen below:

FusionCharts should load here..


Given below are the attributes used to configure the export options in the chart above:

Name Description
exportEnabled This attribute gives you the option to allow exporting to images/PDFs.
exportFormats

This attribute accepts the format to which the chart will be exported.

Custom labels which appear to the user for each type can also be provided.

Example:

"exportFormats": "PNG=Export as High Quality PNG | PDF=Export as PDF File"

exportTargetWindow In case of Private Export Server and when using download as action, this attribute lets you configure whether the return image/PDF will open in the same window (as an attachment for download), or whether it will open in a new window.
exportFileName This attribute lets you specify the name (excluding the extension) of the output (export) file.

The data structure needed to configure the export menu as above is given below:

...


The following is a complete list of chart level attributes that can be used to enable and configure exporting as an image or pdf:

Attribute Name Type Range Description
exportEnabled Boolean 0/1 This attribute gives you the option to allow exporting to images/PDFs.
exportShowMenuItem Boolean 0/1 This attribute gives you the option to allow the menu items related to export (for example, Save as JPEG etc.) to appear in the context menu of chart.
exportFormats String

List of formats that can be exported to.

Custom labels which appear to the user for each type can also be provided.

Example:

"exportFormats": "PNG=Export as High Quality PNG | PDF=Export as PDF File"

exportAtClient Boolean 0/1 This attribute gives you the option to use Private Export Server, by giving it the value 0.
exportHandler String

In case of a Private Export Server, this refers to the path of the Export Handler (the ready-to-use scripts that we provide). Make sure to provide the file name along with the path.

In case of Client-side exporting, this refers to the DOM Id of the FusionCharts Export Component that is embedded in your web page, along with the chart.

exportAction String 'save' or 'download' In case of Private Export Server, the action specifies whether the exported image will be sent back to client as download, or whether it will be saved on the server.
exportTargetWindow String _self or _blank In case of Private Export Server and when using download as action, this lets you configure whether the return image/PDF will open in same window (as an attachment for download), or whether it will open in a new window.
exportCallback String Name of JavaScript function that will be called when export process has finished.
exportFileName String Using this attribute you can specify the name (excluding the extension) of the output (export) file.