Realtime Data chart refresh
- Dominant language
- Swift
- Stars
- 28k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I'm using the `LineChartView` to display data that is continuously received (every 0.2 seconds usually, the time could change). My problem is : how do I refresh the chart correctly? At the moment, I have this code to reload :
```
lineChart.data?.notifyDataChanged()
lineChart.notifyDataSetChanged()
lineChart.animate(xAxisDuration: 0.01)
```
I'm using the `lineChart.animate(xAxisDuration: 0.01)` to redraw (refresh) the chart every time I receive new samples. The reload animation is not smooth and it happens using an animation, a workaround basically. How can I achieve the same effect, but in the correct way?
As you can see in issue number #2857 , the `invalidate()` method is missing.
Contributor guide
Assessment
This issue has not been assessed yet.