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
Export Methods (from ts/Extensions/Exporting/Exporting.ts:148-184)
Trigger exports programmatically:
Export Chart
Get SVG
Print Chart
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
Add Watermark or Logo
Different Styling for Export
Export Events
Handle export lifecycle with events (fromts/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
sourceWidthandsourceHeightfor high-resolution exports - Set
scale: 2for 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