Posted 20 July 2018, 12:10 pm EST - Updated 4 October 2022, 9:18 am EST
The order of the items in my legend is currently determined by the order that the items are added to the SeriesItemsSource. (My SeriesItemSource is an ObservableCollection<'T>.)
I would like custom sort the labels that appear in the legend. For example, I might want the list to be alphabetical.
I could add the items to the SeriesItemsSource in an alphabetical order. However, the items are currently added asynchronously and I would rather not give up that feature.
I could re-sort the ObservableCollection<'T> every time I add a new item. However, I’m assuming that would result in all the previously added data series being replotted with every additional item.
What is the best way to sort the labels listed in the legend?