Help with chart that does not update appreciated
See original GitHub issueExpected Behavior
Live update of chart
Actual Behavior
Chart remain static with initial set
Environment
- vue.js version: 2.5.17
- vue-chart.js version: 3.4.0
- npm version: 6.3.0
Hello,
I cloned vuepoint repo, updated packages to latest versions, it is working.
The live update feature does not work in the version of vuepoint. So I try to add it. I added a new chart type to live update data based on your demo . I use the reactiveProp version.
When I inspect the vue component with devtools, I see chartData
prop that changes with my updates but the chart does not update. How can I further debug?
Thanks
P.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Charts not updating when data is updated
I am using Excel for Mac v16.59 on a Macbook Pro with MacOS Monterey 12.2.1. Can anyone help me figure out how to...
Read more >Two ways to build dynamic charts in Excel | TechRepublic
If the chart doesn't update, check the range references. For a dynamic chart technique that takes a different route, read Create a dynamic...
Read more >xAxis categories don't update after first render in line chart #94
After updating the chart, everything is updating except the xAxis categories. Tried changing tickPlacement to 'between' , but it hasn't helped.
Read more >Smith Chart does not update on again data binding to react ...
Hi, I am using the Smith Chart in one of my projects. I fetch data from database and bind it to the react...
Read more >noDataText not updating within Chart. Swift 2 - Stack Overflow
noDataText' doesn't update as expected. Any help would be appreciated :) ios · swift · ios-charts.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have similar problem. I noticed that the watcher added by the ‘reactiveProp’ mixin is not triggered unless any root property of the watched property “chartData” is changed. So not so useful when the actual data value changes. If I then copied that watcher and add deep: true to watcher options, I instead get problems with Vue warnings “[Vue warn]: You may have an infinite update loop in watcher with expression “chartData”” It seems that we get problem because some deep nested data in the shared chartData is mutated somehow by chart.update() making Vue watcher triggering unwanted(ghost) changes constantly. The only solution was to watch the chartData.datasets[0].data array separately (deep not needed) and call chart.update() by first makeing a copy of that data array into this.dataArray and watch that.
The feature discussed here is awesome and I love it being implemented here.
Unfortunately, on my end changes in
mixins.reactiveProp
do not update charts, for complex data structures at least. Followed the same steps as @jonasohrn, and ended up with the same results, except I don’t quite get the solution:Question 1: Could you please share the watcher code for this part or perhaps elaborate? My understanding is that you are watching a property, calling update on change and honestly, next I get lost with this copying and watching something else.
Question 2: Does this solution also deal with situations when we do not know exactly which part of data object passed as
chartData
is changing? It feels it is rigged to deal with a particular, known-ahead-of-time fraction of possible model, but I might be wrong.