We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Mouse Click event on PieSeries


First of all I would like to thank you for providing such an amazing tool, for free, for freelance developers like. It is of great help to design and develop Proof of Concepts.
The following is what I am trying to achieve;
1. PieChart which shows the Status of few items.
2. DataBinding using MVVM with the following sample data ;
 SampleData = new ObservableCollection<ProbStatus>();
            SampleData.Add(new ProbStatus { Type = "Open", NoOfItems = 5 });
            SampleData.Add(new ProbStatus { Type = "At Customer", NoOfItems = 50 });
            SampleData.Add(new ProbStatus { Type = "Returned", NoOfItems = 25 });

 public class ProbStatus
      public string Type { get; set; }

      public int NoOfItems { get; set; }
3. With the above data, the piechart will have 3 sections. Now when a particular section is clicked, then the details of that particular section should open up.
My question is how to handle the mouse event so that I know that this is the section that is clicked?

Looking forward for an answer from you.

Thank you very much in advance.

Best regards,
Krishna Kumar

2 Replies

KK Krishna Kumar Nanjundaprasad July 8, 2015 11:45 AM UTC

I found out a way to do it. Used the ChartSelectionBehaviours and SelectedIndex in the SfChart and PieSeries respectively. Now this SelectedIndex can be used in my view model.

Thank you very much.

SS Suresh S Syncfusion Team July 8, 2015 11:52 AM UTC

Hi Krishna,
Thanks for update.
We are glad you found the solution, if you request any further assistance on this, please contact us.
Suresh S

Live Chat Icon For mobile
Up arrow icon