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
Dynamic refreshing of chart #51
Comments
On second thoughts, is there a way to use 'shouldComponentUpdate' to prevent unnecessary updates? |
Hey @hari-rangarajan, Re-creating a new visualization object on each re-draw would make the library feel sluggish, and all animations when changing the data will be lost, so I'm not sure it would be the best idea. Can you provide me with some code that I can run to help debug this issue ? Cheers ! |
I don't how to package a runnable version but here is the idea to trigger the bug. Set new data when processing any event. The old tool tips get stuck. This is what the stack overflow link I posted earlier talks about. componentDidMount: function() { }, } |
Another way to do it would be to create a component containing any html element and the google chart. When handling any event on the google chart, update the html element with a setState. This will force a redraw on the entire component and produce the problem. |
I'm running into this problem with tool tips getting stuck: http://stackoverflow.com/questions/36205526/tooltip-bug-with-dynamic-google-charts
Can you consider adding this solution:
"
container = document.getElementById('' + youridentifier + '');
chart = new google.visualization.Timeline(container);
chart.draw(dataSet, options);
Every time you "redraw" the google chart you have to create a new visualization object .
"
Thanks
The text was updated successfully, but these errors were encountered: