-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change name of chart #36
Comments
There's a pull request to add listeners to a chart as you create them. Can that solve your problem? Thank you! |
Hm. How do I get the object that triggered the event? I mean inside the listener code? I.e. how to get the example code working: var selectedItem = chart.getSelection()[0]; 'chart ' is not recognized here. |
Your callback code has access to
PS: You need to make sure you have the event registration patch |
Thanks man, that worked for me, too! |
Good call. I'll tag this and add it to the doc when I have the time. Thanks! |
I see that the JS generated is like this:
var chart = new google.visualization.#{class_name}(document.getElementById('#{element_id}'));"
This means that if you generate several charts in the same page, it would be impossible to fetch those objects individually (imagine if you want to add an event to each of the charts?).
It might be a good idea to make the name unique, maybe let the user name it when creating the chart?
The text was updated successfully, but these errors were encountered: