Reputation: 69
Is it possible to call a function whenever an option in a category filter is selected?
The answer here is what I'm looking for, but since I'm using Google's API I'd assume I can't access the element's HTML and attach an onChange() event. The only callback Google docs mention is setOnLoadCallback(), but it's only for the entire dashboard.
Any help is appreciated. Thanks!
Upvotes: 0
Views: 261
Reputation: 137
this should be possible with a statechange listener:
function stateChangeHandler() {
console.log("hello");
};
google.visualization.events.addListener(**name-of-your-filter**, 'statechange', stateChangeHandler);
Upvotes: 1