amcharts3
amcharts3 copied to clipboard
Problem firing events
Hi, we are evaluating purchase the library. First we used v4 but due to some performance problem over iexplorer we are now using v3.
With v4 we had no problems with "ready" events, but with v3 the event is fired when makeChart is called. This also happens with "init" event.
For example, this is not firing never:
AmChart chart = AmCharts.makeChart(div, conf); chart.addListener("rendered", () -> { AmCharts.makeChart(div2, conf2); });
We are using amcharts over GWT.
Do you have any ideas?
Thanks in advance
I suspect that adding "rendered" event after makeChart()
call might happen after it has been fired.
How about adding it into config?
{
// ...
"listeners": {
"event": "rendered",
"method": function(ev) {
// ...
}
}
}
Hi again Martynas!
Thanks for your response. I will try it and think it will work.
I was based on the stackoverflow answer https://stackoverflow.com/questions/44491378/multiple-charts-latency-issue-svg-or-html5-canvas
Had the same problem. Adding listeners into the config, as @martynasma suggested, solved the problem.