Comments (22)
@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
from chartjs-plugin-streaming.
Yes, that's obviously what I did. But that's not sustainable.
from chartjs-plugin-streaming.
Looking at the code of this plugin and chartjs, it seems that the plugin uses a deprecated event to clean everything: destroy
.
From Chartjs' doc, it appears the correct event is now: afterDestroy
.
from chartjs-plugin-streaming.
For some reason, I wasn't notified of these waiting PR...
I merged yours, thanks!
from chartjs-plugin-streaming.
I've just released v3.1.0 which includes your fix.
from chartjs-plugin-streaming.
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:
const chart = ref<LineController | null>(null);
onBeforeUnmount(() => {
if (chart.value !== null) {
chart.value.chart.notifyPlugins('destroy');
chart.value.chart.destroy();
}
});
from chartjs-plugin-streaming.
Is this project even maintained?
from chartjs-plugin-streaming.
Did You Find Any Solution @Robloche
from chartjs-plugin-streaming.
Unfortunately, no.
I'd like to give a try at fixing it myself but I'm afraid there would be nobody to approve my PR... 😔
from chartjs-plugin-streaming.
I find a temporary solution just downgrade the chart js version and it will work
from chartjs-plugin-streaming.
Thanks Appreciate it 😍😍
from chartjs-plugin-streaming.
@Robloche
You are referring to the 3.0.4 version you are working on.
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 .
from chartjs-plugin-streaming.
@Robloche You are referring to the 3.0.4 version you are working on.
could you please help me?
Yes. Since this project does not seem to be maintained any longer, I forked it and fixed thedestroy
issue.
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?
Nope, sorry. I don't use this feature.
If you want to give it a try, fix it and create a PR on my forked project.
from chartjs-plugin-streaming.
@Robloche
Thank you for answer. I don't have the experience of forking a project and modifying and applying it yet. But I'll give it a try with your 3.0.4 version.
from chartjs-plugin-streaming.
You don't have to fork it.
Just clone my forked project, fix your issue, and submit a pull request.
Or at least, tell me what to change and I'll do the PR myself.
from chartjs-plugin-streaming.
@Robloche
I forked your project.
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?
from chartjs-plugin-streaming.
Sure.
from chartjs-plugin-streaming.
(I opened the "issues" section, btw.)
from chartjs-plugin-streaming.
@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.
from chartjs-plugin-streaming.
@Robloche many thanks
from chartjs-plugin-streaming.
For now, we were using Chartjs 3.9.1 and it still has that problem. @Robloche can you help me?
from chartjs-plugin-streaming.
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 suggest you do the same if you really need something to be done.
from chartjs-plugin-streaming.
Related Issues (20)
- Possible to start the line chart from left? HOT 3
- Page is blank when making React App with tutorial HOT 1
- Realtime streaming from left to right
- Vue.js renderChart undefined
- Streaming for non timebased data HOT 1
- Problem with types
- How to reset the x axies lables with minite
- Failed to initialize NumberFormat since used feature is not supported in the linked ICU version on Ubuntu
- Need axis scale as "realtime" with "timeserias" properties
- Websocket question HOT 1
- Can't change x axis time format from AM / PM to 24 hour clock
- Any State Changes triggers re render and loss of data HOT 2
- when I toggle chartjs streaming, streaming configurations still working.
- Stream to the right side, start plotting from the left side
- Plans to update for ChartJS 4.x? HOT 11
- Chartjs Line chart streaming stops when browser tab is not active HOT 1
- Change spacing between ticks on x-axis?
- Styling: left, right, and yAxis line color? HOT 1
- Streaming Moves Rapidly Left when Duration of Graph is Full of Data HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chartjs-plugin-streaming.