SAL
SAL

Reputation: 1260

HighCharts: Can I call the Exporting functions directly?

Is it possible to call the HighCharts Exporting module functions directly? I'd like to have a button elsewhere on the page that can call the 'downloadPNG', 'downloadJPEG' etc functions that are usually called from the exporting contextButton.

Upvotes: 0

Views: 143

Answers (1)

ppotaczek
ppotaczek

Reputation: 39099

Yes, you just need to use exportChart method, for example:

chart.exportChart({
    type: 'image/png'
});

Live demo: http://jsfiddle.net/BlackLabel/0mLy6du3/

API Reference: https://api.highcharts.com/class-reference/Highcharts.Chart#exportChart

Upvotes: 1

Related Questions