Marcelluszebra
Posts: 18
Joined: Mon Mar 04, 2019 3:40 pm

Offline export using chart.exportChart()

Hi,

Take a look to thist demo:
https://jsfiddle.net/dho4yc38/1/

Using standard export button the offline-export module is used.
Instead, using chart.exportChart(), nope.
It's a bug? Exists a workaround?

Thanks,
marc.
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Offline export using chart.exportChart()

Hi,

Thanks for the question!

On the Highcharts.Chart you have two exporting methods available:
- exportChart() which exports from a server (exporting module is required)
- exportChartLocal() which exports the chart locally, offline (offline-exporting module is required)

If you want to export your chart locally then you should use the latter method.

Demo: https://jsfiddle.net/BlackLabel/kaedohLm/

API:
- https://api.highcharts.com/class-refere ... xportChart
- https://api.highcharts.com/class-refere ... ChartLocal

Let me know if that's what you were looking for.

Best regards!
Jakub
Highcharts Developer
Marcelluszebra
Posts: 18
Joined: Mon Mar 04, 2019 3:40 pm

Re: Offline export using chart.exportChart()

Thanks!
marc.
Marcelluszebra
Posts: 18
Joined: Mon Mar 04, 2019 3:40 pm

Re: Offline export using chart.exportChart()

A last question.
exportChartLocal apply FallbackToExportServer if fails?

marc.
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Offline export using chart.exportChart()

Hi,

From the API (https://api.highcharts.com/highcharts/e ... portServer):
Whether or not to fall back to the export server if the offline-exporting module is unable to export the chart on the client side.

So, yes, if the offline exporting fails and fallbackToExportServer is set to true then it tries to export the chart online.

Kind regards!
Jakub
Highcharts Developer

Return to “Highcharts Usage”