amcharts / export

Apache License 2.0
56 stars 33 forks source link

export as image in Chrome cannot find canvg function #85

Closed Cookizza closed 5 years ago

Cookizza commented 5 years ago

This is working in all browsers I have tested, but doesn't work in Chrome. We are using the normal export buttons options as provided by the amCharts4 docs here -> https://www.amcharts.com/docs/v4/concepts/exporting/

Exporting as CSV, SVG or JSON is just fine, however on pressing any of the export buttons that are to produce an image we get the below..

Uncaught (in promise) TypeError: n is not a function
at t.<anonymous> (Export.js:854)
at o (tslib.es6.js:97)
at Object.next (tslib.es6.js:78)
at r (tslib.es6.js:68)

The file that it is referencing -> Export.js:854 which is where it calls

res = canvg(canvas, data, config);

So it seems like it cannot find the canvg function. However in the console, I can call that function just fine and even get back it's definition.

As said above, it works fine in Firefox, Brave & Edge.

Any support appreciated!

Cookizza commented 5 years ago

I have updated to version 4.1.13 of amCharts core and this issue is resolved.

If anyone else finds issues on export, check your lock files for old versions!

Thanks amCharts for an awesome lib