I looked at this thread but it doesn’t help me.
I have problem where an item is still shown in the legend even though no series is currently displayed on the chart.
- The SciChart RenderableSeries dependency property of my chart surface is a property in my view model named “Measurements”, I.e. ObservableCollection of IRenderableSeries.
- An ObservableCollection of another class named “ExampleList” is also in my view model.
- In a data grid elsewhere in the application a user selects 3 rows. The “ExampleList” collection now has 3 items in it. Part of the setter for that property is to call “Measurements.Clear()” and then follow that with a “Measurement.Add(newseries)” 3 times.
- When a user selects an individual item in the data grid that contains no points that could be displayed on the chart I only call “Measurements.Clear()” and I don’t subsequently called “Measurements.Add()”
My issue is that the legend never clears and shows the last series that was selected before selecting this new item which shouldn’t even be in the chart. It’s behaving as if the chart were not cleared; although I have verified that I definitely am calling “Measurements.Clear()”