Search code examples
wpflivecharts

WPF-LiveCharts Legend not update


Code First: https://github.com/ShannonZ/playground

I use a listbox serve as a clickable legend so that the visibility can be controlled.

I've added a button to modify the series but after that the legend (ListBox Item) did not update. I've traced into LiveCharts.Helpers.NoisyCollection and found the implementation of INotifyCollectionChanged Interface.

Any one can help to this issue?


Solution

  • If I understand correctly, you want the button you added to update the listbox which is your legend?

    Your converter seems to be causing the problem. By removing the converter from the xaml binding you get the desired result.

    ItemsSource={Binding Series}