Skip to content

Exporting Charts

Froala Charts uses JavaScript to render charts in the browser using SVG and VML. A prominent feature of the suite is the ability to export the rendered charts in the JPG, PNG, SVG, and PDF formats.

The export is done using a server-side helper library that converts the SVG to the required format. VML can also be exported as it is converted to SVG internally before exporting. During the export process, the data to be exported is sent to the Froala Charts servers for processing and generating the output in the required format.

When charts are exported on the client side, the entire exporting process is carried out using the user’s browser. The chart’s SVG is converted into the selected export format and downloaded using the HTML5 download attribute.

Note: You must have an active internet connection for this feature to work.

To enable chart exporting, the chart level attribute exportEnabled is set to 1. The menu button is then visible in the top-right corner of the chart. Click/hover over this menu button to see the dropdown menu with the export options, as shown in the image below:

From the menu , select the desired format; the chart is downloaded to your machine in the selected format.

A Column chart with export enabled is shown below. Click the menu button and select a format to export the chart.

Modes of Export

Froala Charts supports the following three modes of export:

  • Server-side export
  • Client-side export
  • Auto export

By default, charts are exported using the auto export feature.

The exportMode attribute is used to switch betwen the modes of export.