Yes, you are correct, but this is not strange behavior. This: google.visualization.events.addListener(categoryPicker,'statechange',onControlStateChange());
calls the function, while this: google.visualization.events.addListener(categoryPicker,'statechange',onControlStateChange); passes the function as an argument to the event addListener function. The first case would be valid only if the "onControlStateChange" function returns a function. On Wednesday, June 20, 2012 4:41:04 PM UTC-4, Benjamin Press wrote: > > Actually, I figured it out on my own, but for anyone who is interested: > > For some reason, this line: > "google.visualization.events.addListener(categoryPicker,'statechange',onControlStateChange());" > > immediately calls onControlStateChange. > > remove the () from it to fix it: > > "google.visualization.events.addListener(categoryPicker,'statechange',onControlStateChange);" > > For some reason, this works. > > On Wednesday, 20 June 2012 15:27:09 UTC-5, Benjamin Press wrote: >> >> On load, the CategoryFilter will fire a statechange event, but once >> loaded, deselecting or selecting a value does not fire the event. I can't >> figure out why, but this is the case. Here is the code that I'm using: >> >> http://jsfiddle.net/D6ztF/4/ >> >> Please, if someone could let me know why the graph isn't being re-drawn >> when you change what's selected, I'd be really appreciative. >> > -- 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/-/cKytZ6uU5MwJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
