Calling chart.update with less datasets fails
See original GitHub issueExpected Behaviour
Dataset is removed
Actual Behaviour
TypeError
Cannot read property 'yPositions' of undefined
AxisChart.eval
https://viqud.csb.app/node_modules/frappe-charts/dist/frappe-charts.esm.js:2718:25
ChartComponent.refresh
https://viqud.csb.app/node_modules/frappe-charts/dist/frappe-charts.esm.js:1540:30
ChartComponent.update
https://viqud.csb.app/node_modules/frappe-charts/dist/frappe-charts.esm.js:1560:10
eval
https://viqud.csb.app/node_modules/frappe-charts/dist/frappe-charts.esm.js:1347:54
AxisChart.render
https://viqud.csb.app/node_modules/frappe-charts/dist/frappe-charts.esm.js:1346:16
AxisChart.update
https://viqud.csb.app/node_modules/frappe-charts/dist/frappe-charts.esm.js:1339:10
evaluate
/src/index.js:60:5
Steps to Reproduce:
- Create a chart with multiple datasets
- Call
chart.update
with the new data object with less datasets
I thought maybe this was related to some animation code but it seems to happen even when animation option is passed in with 0
The use-case here is that we’re showing 4 data sets that the user can toggle on/off to view less or more data but when removing datasets we’re seeing a type error
NOTE: Add a GIF/Screenshot if required.
Frappé Charts version: Codepen / Codesandbox: https://codesandbox.io/s/frappe-charts-demo-forked-edktp
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Dynamically update values of a chartjs chart - Stack Overflow
in the test code, I am updating the values with datasets[0].data - is this the right way to do it? The problem with...
Read more >Troubleshoot refresh scenarios - Power BI - Microsoft Learn
This article provides ways to troubleshoot issues with refreshing data within the Power BI service, for various data sources and conditions.
Read more >2 ways to reduce your Power BI dataset size and speed up ...
Adam shows you two things to reduce your Power BI dataset size. ... a lot of space and improve refresh times along with...
Read more >Updating dataset properties | BigQuery - Google Cloud
You can update a dataset's description in the following ways: Using the Google Cloud console. Using the bq command-line tool's bq update command....
Read more >Visualization: Pie Chart - Google Developers
Slices less than 25% of the pie will be // combined into an "Other" slice. ... The chart accepts further method calls only...
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 Free
Top 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
No worries, no rush at all. I’ve temporary solved it by redrawing the entire chart:
Not ideal of course, but in the meantime it works =) Thanks for looking into it though; always enjoyed Frappe Charts and I’m sure other have/or will have encounter this issue to.
Heya, I spent some time trying to fix this, and I managed to uncover quite a few holes in the data update pipeline. It’ll take some more time for me to fix this.