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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfChart for Pie Series - Possibility to have event on Pie chart colored portion to deep drive to display list.

Thread ID:





129035 Feb 22,2017 04:40 PM UTC Feb 26,2017 03:53 PM UTC Xamarin.Forms 3
Tags: SfChart
Asked On February 22, 2017 04:40 PM UTC

Need help with sample code where it shows how to have the event to click on colored part of pie chart to navigate to a new page to display the items for those colored part.
So every colored part should navigate to show respective items included in that part of pie chart.

Saravana Pandian Murugan [Syncfusion]
Replied On February 23, 2017 04:20 PM UTC

Hi Sudhansu,

Thanks for contacting Syncfusion support.

We have prepared a sample based on your requirement which can be downloaded from the below location. We have achieved your requirement using ChartSelectionChanged Event.

Sample : http://www.syncfusion.com/downloads/support/forum/129035/ze/Doughnut-1073410953  

Saravana Pandian M. 

Replied On February 24, 2017 09:42 PM UTC

Thanks that is working, but how can we unselect the pie once we return to chart page.
Need to know to be able to cancel the selection or set default selection as null.

Replied On February 26, 2017 03:53 PM UTC

We can cancel the selection using Chart.SelectionChanging event. Here is the code for your reference,

chart.SelectionChanging += (sender, e) =>
e.Cancel = true;
Navigation.PushAsync(new ContentPage()
Content = new Label()
FontSize = 20,
TextColor = Color.Purple,
VerticalOptions = LayoutOptions.Center,
HorizontalOptions = LayoutOptions.CenterAndExpand,
Text = "You have Selected an index No: " + e.SelectedDataPointIndex,
}, false);

Attachment: Doughnut_43cd89fa.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon