-
Notifications
You must be signed in to change notification settings - Fork 112
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
3.1.3 dataset.data reload when doing push() #108
Comments
In 3.1.2, the animation only applied to the newly pushed data. And I think it is what to expect. simplescreenrecorder-2022-03-09_11.07.52.mp4 |
I thanks for the report, looks like a rushed a little on this update. I will look at it. cloneDeep happens only if the size of the array haven't changed (Chart.js using Proxies too, I think that's was what causing the bug) |
Do you reproduce it on the demo ? https://codesandbox.io/s/demo-vue-chart-3-ugynm?file=/src/App.vue |
To reproduce it is not hard. You may create a scales: {
x: {
type: 'time',
display: false,
},
y: {
title: {
display: true,
text: 'value',
},
},
}, and push data point to it datasets[0].data.push({ x: Date.now(), y: Math.random() }); within a Hope it would help. |
I have the same issue with both a line chart and bar chart. I'm using vue-chart-3 |
Yeah, it seems like the fix I added broke the animations. I need to take a time but this week it's going to be hard |
Currently finding out a way to compare new and old values |
Should be fixed in |
No worries, can confirm that this is fixed in |
Describe the bug
simplescreenrecorder-2022-03-09_11.05.49.mp4
As shown in the video, each data.push() action would trigger a full reload by the animation.
3.1.3 is related to #58 , I think the cause of this problem is the cloneDeep() of data array. So each update/render is a full reload in 3.1.3
To Reproduce
Put a reproduction link here based on this templates
Version of
vue-chart-3
3.1.3
Version of Vue
The text was updated successfully, but these errors were encountered: