amcharts3 icon indicating copy to clipboard operation
amcharts3 copied to clipboard

Problem firing events

Open RaulPampliegaMayoral opened this issue 5 years ago • 3 comments

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

RaulPampliegaMayoral avatar Apr 19 '19 17:04 RaulPampliegaMayoral

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) {
      // ...
    }
  }
}

martynasma avatar Apr 20 '19 09:04 martynasma

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

RaulPampliegaMayoral avatar Apr 20 '19 14:04 RaulPampliegaMayoral

Had the same problem. Adding listeners into the config, as @martynasma suggested, solved the problem.

zur4ik avatar Feb 10 '20 12:02 zur4ik