export
export copied to clipboard
amcharts : callback isn't fired on chart.export.capture(options, callback)
Hi there,
I just experienced some misfired callback on chart.export.capture(options, callback)
Im using amcharts version 3.21.11 Export Plugin.
Here's some code I've used to reproduce the issue:
chart.export..capture({
action: "draw"
}, function() {
console.log("TEST");
})
This method toggle the chart to Annotation mode but the function itself does not fired at all.
Best Regards, Mark
Hi Mark
I had the same problem. Make sure that you're including the libraries that go with the export feature.
From the docs: http://www.amcharts.com/kbase/exporting-charts-and-maps-to-images-or-pdf/
The plugin relies on a number of different libraries, to export images, draw annotations or generate download files. Those libraries need to be loaded for the plugin to work properly.
The docs show you couple of ways to fix this problem. What worked for me is to fix the path property under exports.libs in my JSON chart creation.