Adding event listeners within chart config

If you are creating chart using AmCharts.makeChart(divId, config) method, instead of using chart.addListener method, a much better approach would be adding listeners directly to chart config. This is done using listeners property of a AmChart or ChartScrollbar or ChartCursor (any object which has events). listeners property accepts array of objects each of them must have event and method properties, like:

   "type": "serial",
   "listeners": [{
      "event": "rendered",
      "method": handleRender
      }, {
      "event": "zoomed",
      "method": handleZoom
   }],
   // rest of config

This way is better because you will be sure the listener will be added before chart is build for the first time, as if the page is fully loaded, makeChart can be completed and events like init, rendered and similar fired even before you add listeners using chart.addListener method.