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
close icon

DoughnutSeries Clicked Event

Hi Team,

I want to explode each index of the Doughnut on click can I do that. If I can how?

Thanks,
Femil Shajin C

4 Replies

ME Manivannan Elangovan Syncfusion Team September 14, 2015 01:14 PM UTC

Hi Femil,

Thanks for using Syncfusion Products.

We can achieve your requirement by using ChartSelectionBehavior. The ChartSeries have a property called EnableDataPointSelection which enable ChartSelectionBehavior and it has two events SelectionChanged and SelectionChanging. The two events are used to view the details of selected datapoints. When the touch starts on datapoint location SelectionChanging event is called and SelectionChanged event is called at touches end. The following code example helps to explode the selected segment using SelectionChanged event.

Code Example:

DoughnutSeries doughnut = new DoughnutSeries ();

doughnut.EnableDataPointSelection = true;

doughnut.SelectedDataPointColor = Color.Green;

doughnut.ItemsSource = Data;

void Chart_SelectionChanged (object sender, ChartSelectionEventArgs e)

{

     // below code set the selected segment index as explode index.

    doughnut.ExplodeIndex = e.SelectedDataPointIndex;

}

We have prepared a sample based on the requirement. You can download the sample from the following location.

Sample: DoughnutSeries

Regards,
Manivannan.E



RP Ranjani Prabhakaran Syncfusion Team September 15, 2015 06:17 AM UTC

From: Femil Shajin [mailto:femil@getcloudcherry.com]
Sent: Monday, September 14, 2015 9:50 AM
To: Syncfusion Support <support@syncfusion.com>
Cc: Sudharani Singaravelu <sudharani@getcloudcherry.com>
Subject: Re: Syncfusion support community forum 120234, DoughnutSeries Clicked Event, has been updated.


Hi,


Great, Checked your sample works for me. Please let me know wheather there is a detailed documentation on what each field which will give me a complete knowledge of your library.


Thanks and Regards,



RP Ranjani Prabhakaran Syncfusion Team September 15, 2015 06:19 AM UTC

From: Femil Shajin [mailto:femil@getcloudcherry.com]
Sent: Monday, September 14, 2015 9:24 AM
To: Syncfusion Support <support@syncfusion.com>
Cc: Sudharani Singaravelu <sudharani@getcloudcherry.com>
Subject: Re: Syncfusion support community forum 120234, DoughnutSeries Clicked Event, has been updated.


Hi Team,


Wow! Thanks for your sample and I should say this , you people have done a great job. Will get back to after checking on it. Is there any documentation for this? I would like to check all possibilities and make the charts work for us. I have gone through your online documentation and samples in github but is it possible for me to have deep dive in to the documentation for all charts?


Thanks and Regards,

Femil Shajin C



ME Manivannan Elangovan Syncfusion Team September 15, 2015 10:11 AM UTC

Hi Femil,

Thanks for the update.

Currently, we are working on the UG documentation and it will be updated as soon as possible. We will let you know once it is updated.

Regards,
Manivannan.E


Loader.
Live Chat Icon For mobile
Up arrow icon