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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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.