Open rinatio opened 5 years ago
Yes:
AmCharts.addInitHandler(function(chart) {
chart["export"].enabled = chart["export"] == undefined || chart["export"] != false;
});
thanks @martynasma! can you tell if it's possible to do with amcharts3-react
? It gives an error TypeError: Cannot set property 'enabled' of undefined
@Pauan Can you elaborate? I personally don't have experience with React.
@martynasma It should work the same in amcharts3-react
, your init handler was just a bit wrong:
AmCharts.addInitHandler(function(chart) {
if (chart["export"] == null) {
chart["export"] = {};
}
if (chart["export"].enabled == null) {
chart["export"].enabled = true;
}
});
@Pauan Doesn't seem to be working. Investigating.
We're looking into how to enable AmCharts exporting here: http://www.amcharts.com/kbase/intro-exporting-charts/ and it says that config needs to be updated like this:
Is it possible to specify this globally so all charts will have export enabled unless it is explicitly disabled?