unbinding event handlers

427 views
Skip to first unread message

asgallant

unread,
Dec 19, 2011, 6:48:18 PM12/19/11
to google-visua...@googlegroups.com
Ok, stupid question time >;o)~

How do we unbind visualization event handlers?  See http://jsfiddle.net/ftVum/

Viz Kid

unread,
Dec 20, 2011, 2:58:19 AM12/20/11
to google-visua...@googlegroups.com

It seems that this was never documented.
There are two methods you can use:
google.visualization.events.removeAllListeners(object)
Removed all the listeners of some object (the chart for example)

google.visualization.events.removeListener(listener)
Removes a specific listener, where the listener object is the one returned from addListener.

Here is your modified code (changed the alert to console.log and the ready to select so you can easily invoke it many times)

  Viz Kid

On Tue, Dec 20, 2011 at 1:48 AM, asgallant <drew_g...@abtassoc.com> wrote:
Ok, stupid question time >;o)~

How do we unbind visualization event handlers?  See http://jsfiddle.net/ftVum/

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/L0RhcBmu5qMJ.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.

asgallant

unread,
Dec 20, 2011, 9:04:21 AM12/20/11
to google-visua...@googlegroups.com
Awesome, thanks  >;o)
Reply all
Reply to author
Forward
0 new messages