You are viewing documentation for an older version. For current documentation - click here.

Using removeEventListener function to remove a event listener. First, we add an event listener for DrawComplete event and it shows an alert. In this event listener we remove the listener. Use the button to set a chart attribute and raise the DrawComplete event again. Now, notice that the event listener (showing alert) will not be called.

 

FusionCharts will load here!

Change chart attribute to fire DrawComplete event

 

 

 

The above sample showcases how to use removeEventListener function in JavaScript. Click here to know more on how the code of this example works.