-
Notifications
You must be signed in to change notification settings - Fork 136
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
TypeError after unmounting chart #177
Comments
Is this project even maintained? |
Did You Find Any Solution @Robloche |
Unfortunately, no. |
I find a temporary solution just downgrade the chart js version and it will work |
Yes, that's obviously what I did. But that's not sustainable. |
Looking at the code of this plugin and chartjs, it seems that the plugin uses a deprecated event to clean everything: |
@Dola97 If you're still interested, I forked the project and fixed this issue. I also bumped all dependencies versions. https://www.npmjs.com/package/@robloche/chartjs-plugin-streaming |
Thanks Appreciate it 😍😍 |
@Robloche could you please help me? Even the 2.0.0 version has the same problem. I made a sample using simple chart.js and chartjs-plugin-streaming. When I hover over the chart, I get Cannot read properties 'getDatasetMeta' error. Have you ever had this experience? This happens when using the latest version(4.*) of chart.js . |
If you want to give it a try, fix it and create a PR on my forked project. |
@Robloche |
You don't have to fork it. |
@Robloche I am using chart.js 4.1.1 version and also using vue-chartjs. Your repo has a closed issues section. So we communicate here. The realtime chart works fine, but the tooltip doesn't appear when I hover over it, and it says getDatasetMeta is undefined. And I reproduced and corrected the problem. Can I add a branch and request a PR? |
Sure. |
(I opened the "issues" section, btw.) |
@Robloche - thanks for fixing this issue with your fork. There are 2 PRs on your fork that fix tooltips - without tooltip fix installing your fork fixes the unmount problem but breaks ChartJS tooltips. |
For some reason, I wasn't notified of these waiting PR... |
@Robloche many thanks |
I've just released v3.1.0 which includes your fix. |
If like me you don't like to use something else than the official package (which seems unmaintained, Robloche is right), you can fix this issue with something like that:
|
For now, we were using Chartjs 3.9.1 and it still has that problem. @Robloche can you help me? |
I'm sorry but I don't work on this project. I simply forked it to make fix a bug for my own use. |
I have a
<Line>
chart in my React app.Since I updated chart.js to v4.0.1, I get the following error when I unmount my chart:
This error is triggered repeatedly and infinitely. It seems that some kind of timer has not been cleared.
Here's my code:
The text was updated successfully, but these errors were encountered: