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
update event not firing on data change #118
Comments
Hi @Lenndev , thanks for the issue. So, with vue 2.2.1 and vue-chartjs 2.5.6 I will try to reproduce it tomorrow. However, your jsfiddle, it not vue / vue-chartjs related 😕 |
Hey @Lenndev could you provide two fiddles with a working and a non-working example? And to be honest, I don't see that this will be working. And I kind of doubt, that this worked before. 🤔 If you take a look in the vue.js docs for the updated hook
But as Chart.js works in a canvas, there is never a change in virtual dom and never a vue.js re-render or patch. So in my mind, the |
Hi @apertureless sorry for the delayed response, You have to believe me that it does work with the mentioned versions, much more than the code i gave you i cannot give.
|
Have you also updated Vue.js to the current version? |
Hey @Lenndev well, I could not reproduce this. I mean, I could not reproduce a working example. I setup here a pen with vue-chartjs 2.5.6 https://codepen.io/apertureless/pen/BZKBdX However the Furthermore I don't think that it is related to vue-chartjs. As nothing that critical has changed form 2.5.6 up to the current version. Some changes in the build setup mostly and smaller bug fixes. However, instead of using the Vue.js Or you add your own watcher to chart-data and if something changes, you can call your ✌️ |
🔐 Closed due to inactivity |
After updating to latest version it seems the update event is not being fired on datachange.
Anyone else having this same issue? Even better, a solution?
Expected Behavior
the width of the chart is adjusted by the length of the data.
the parent div is also resized, making it scrollable.
example : jsfiddle https://jsfiddle.net/Lenndev/p8dwaaf3/
This code does work with vue-chart.js version 2.5.6
Actual Behavior
this.resizeWidth()
is not fired becauseupdated()
is not fired. therefore the width of the parent div and therefore the canvas is not resized, causing the chart to be very squeezedEnvironment
The text was updated successfully, but these errors were encountered: