How to update the data in line chart
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here
Current behavior Shows the same data all the time in the plot
Expected behavior
Update the data, specifically the series.value
when list item is clicked
Reproduction of the problem
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
-
ng2d3 version: x.x.x “ng2d3”: “^2.0.0”,
-
Angular version: 2.x.x “angular-cli”: “1.0.0-beta.19-3”,
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] Chrome
-
Language: [all | TypeScript X.X | ES6/7 | ES5] Typescript, HTML
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Update the data in an existing chart - Microsoft Support
Changes you make will instantly show up in the chart. Right-click the item you want to change and input the data--or type a...
Read more >Update, Change, and Manage the Data Used in a Chart in Excel
To edit the data selection of a chart, right click the chart and select the Select Data option - or select the chart,...
Read more >How to auto update a chart after entering new data in Excel?
1. Select the data range and click Table under Insert tab, see screenshot: · 2. In the Create Table dialog box, if your...
Read more >Updating Charts - Chart.js
Adding and removing data is supported by changing the data array. To add data, just add data into the data array as seen...
Read more >Excel Tips: How to Make Charts Auto Update - GCF Global
Luckily, there is an easier way. Simply format your source data as a table, then create a chart based on that table. When...
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
You need to pass it a new array in order for the change detection to trigger. The charts use immutable inputs.
Simplest way would be to just do
results = [...results]
. This will generate a new array and trigger the change detection. This has already been answered: https://github.com/swimlane/ngx-charts/issues/118I’m experiencing the same problem. Is there a way around this?