Hello,
I am currently implementing a monitor, which displays waveforms like in an oscilloscope. For this purpose I used the SFChart and created an ObservableCollection, which holds the data. I use the ObservableCollection like a ring buffer. This means its items don't change (because I don't remove or add items). Only the data inside of the list items changes over time. Because of that having an ObservableCollection is almost useless, since the PropertyChanged event only fires when items are added or removed. To update my SfChart nevertheless, I currently set the ItemSource = null and then again to the changed ObservableCollection. This forces a complete redraw of the chart. While this solution works, I have a few problems with that:
- The garbage collection works almost the whole time, because of the huge amount of data I discard and reassign.
- The redraw process takes more CPU load than necessary.
Is there a way to only update parts of the ItemSource in a SfChart? If yes, would it be possible to animate this?
Thanks,
Janosch