Skip to main content

Export Functionality

The Highcharts Exporting module provides built-in functionality to export charts as images (PNG, JPEG, SVG), PDF files, or print them directly.

Setup

Include the exporting module in your project:

Basic Export Configuration

By default, a context menu with export options appears when hovering over the chart.

Enable/Disable Exporting

Default Export Buttons

The default configuration includes a hamburger menu with export options:

Export Formats

Image Exports (PNG, JPEG)

Vector Exports (SVG, PDF)

Export Button Customization

Button Position and Styling

Custom Menu Items

1

Add Custom Menu Item

Create a custom export action:
2

Multiple Export Buttons

Add additional export buttons:

Export Methods (from ts/Extensions/Exporting/Exporting.ts:148-184)

Trigger exports programmatically:

Export Chart

Get SVG

Offline Exporting

For client-side exporting without an external server:
Offline Export Limitations
  • PDF export requires an external library (jsPDF)
  • Some browsers may have limitations
  • Image quality may vary compared to server-side rendering

Export Server Configuration

Using Highcharts Export Server

Custom Export Server

Exporting with Chart Modifications

Different Styling for Export

Export Events

Handle export lifecycle with events (from ts/Extensions/Exporting/Exporting.ts:189-200):

Fullscreen Mode

The exporting module also provides fullscreen functionality:

Export Data Module

Export the underlying chart data:

Best Practices

Export Quality Tips
  • Use sourceWidth and sourceHeight for high-resolution exports
  • Set scale: 2 for retina displays
  • Use white background for printed charts
  • Include credits and proper attribution
  • Test exports across different file formats
  • Consider using offline exporting for better privacy
Important Considerations
  • External export server sends chart data to Highcharts servers
  • For sensitive data, use offline exporting or your own server
  • Large or complex charts may take time to export
  • PDF export requires additional dependencies
  • Some features (like HTML labels) may not work in all export formats
  • Browser popup blockers may prevent download dialogs

Complete Example