Pre loader

Trouble to get Selected seri from chart

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies