I am trying to download one chart with different scales in one click. I have an array of scales and I loop over them and export chart each iteration with corresponding scale. However, chart gets downloaded once and scaled by 3 which is the last element of the scales array.
const scales = [1,2,3];
const exportChart = (scale) => chart.exportChart({scale});
$('button.export').click( function () {
scales.forEach(exportChart)
});
I assume I'm not allowed to export chart multiple times. Appreciate if someone can help me with that. Thanks!
Here is my fiddle https://jsfiddle.net/sabira/bf6yLcxw/