You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry to ask this here but I couldn't find any solution for my issue.
I'm trying to use a similar approach to your project where labels and datasets are defined in a child component with binds to props in the parent component but I'm not getting any results.
"Vue.js devtools" add-on shows that props contain data passed in the parent component however the initial console log show empty arrays:
loadData init
Array []
Array []
So due to the fact that "Chart.js does not provide a live update if you change the datasets" I tried reactiveProp mixin which throws the error below, most likely because I'm updating only a single dataset:
Error in callback for watcher "chartData": "TypeError: newData.datasets is undefined"
Questions:
How the charts in your project are updated if initially, bound arrays are empty and I don't see any related mixin or watcher?
How to use vue-chartjs mixins to provide live updates in this case? I want to keep all the options and config in the chart component and just update the labels and datatsets.
Sorry to ask this here but I couldn't find any solution for my issue.
I'm trying to use a similar approach to your project where labels and datasets are defined in a child component with binds to props in the parent component but I'm not getting any results.
"Vue.js devtools" add-on shows that props contain data passed in the parent component however the initial console log show empty arrays:
So due to the fact that "Chart.js does not provide a live update if you change the datasets" I tried reactiveProp mixin which throws the error below, most likely because I'm updating only a single dataset:
Questions:
How the charts in your project are updated if initially, bound arrays are empty and I don't see any related mixin or watcher?
How to use vue-chartjs mixins to provide live updates in this case? I want to keep all the options and config in the chart component and just update the labels and datatsets.
This is my example in a codesandbox.
Btw, this works with computed properties but not with data/methods for some reason.
Thanks for this great software!
The text was updated successfully, but these errors were encountered: