export icon indicating copy to clipboard operation
export copied to clipboard

amcharts : callback isn't fired on chart.export.capture(options, callback)

Open kevzlou7979 opened this issue 7 years ago • 1 comments

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

kevzlou7979 avatar Jan 22 '18 00:01 kevzlou7979

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.

bergur avatar Apr 15 '18 22:04 bergur