SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

0
0

Dear all,

I have an MVVM model which host the property ChartDataSeries as below :

 public ObservableCollection<IRenderableSeriesViewModel> ChartDataSeries
    {
        get { return _seriesViewModels; }
        set
        {
            SetProperty(ref this._seriesViewModels, value);
        }

What I ham trying to do is to identifier the selected serie user select in the chart and find it afterward in the ChartDataSeries collection in order to set a property IsSelected=true but trouble is that I cannot reach the selected Data serie from the collection.

I have bee through your sample but could not get it either

Any y help or idea how to do ?

regards

Version
4
  • sc sc
    Few precision. The ChartDataSeries propertyy above is bind to the RendarableSeries of my sciChart control. What I am try to get is that when a user select a chart serie, get the selected click serie and find its corresonding index in the datasource ChartDataSeries. Thanks for your help
  • You must to post comments
0
0

Hi there,

You can subscribe to SelectionChanged event in your RenderableSeriesViewModel You will get as a sender the specific series which IsSelected property was changed. Then you can easily find an index of it, using C# function IndexOf();

Best regards,
Markiyan
WPF Developer

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.