Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

ChartCollection<Point> how to remove range?

Solved!
Go to solution

ChartCollection how to remove range? sample: remove(index) remove(Point)

0 Kudos
Message 1 of 2
(2,706 Views)
Solution
Accepted by topic author jiewei_li

Chart collections maintain a strictly increasing range of data, which can be processed more efficiently because it guarantees values in the middle will not be modified or removed. If the range to remove is at the start of the history, then you can temporarily reduce Capacity to remove the elements early; otherwise, the only way to remove elements from a chart collection is to reset the entire collection.

 

Since you are using a collection of points, it appears you only care about the change notification capability of chart collections, rather than the "strictly increasing range" guarantee. In that case, it may make sense to use a different notifying collection like ObservableCollection<T> as your data source, or to use a non-notifying data source like List<T> and manually Refresh the graph as data changes.

~ Paul H
0 Kudos
Message 2 of 2
(2,692 Views)