-
Notifications
You must be signed in to change notification settings - Fork 231
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
Destructor - Tooltip node #100
Comments
Good point. An easy way to do this should be added. For now, a quick workaround (based on this code) is: // remove the tooltip element from the DOM completely
var tt = chart.getTooltipEl();
tt.parentNode.removeChild(tt); Or to hide it, in case you need it back again later: chart.options.tooltip = false;
chart.updateTooltip(); Or: chart.getTooltipEl().style.display = 'none'; I haven't tested any of these snippets though. If someone wants to put together a PR that addresses this issue, it'd be great. |
@gfduszynski I'm curious of the use case of why you want to remove the tooltip node or destroy it upon leave? Can you explain? |
Thanks for quick feedback. I'm displaying 2 charts on one of my views. BTW: Suggested fix (first one) is good enough for me 👍 for now. |
Hi,
Is there a chart destructor which removes chart tooltip node?
Upon entering a view I'm creating chart instance and I would like to destroy it upon leave.
I don't see a way to remove the tooltip node without using hacks.
The text was updated successfully, but these errors were encountered: