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

On Pie Chart Click Event

I have used synfusion library in xamarin forms to create a doughnut chart. Now, I want to open another page on clicking any of the slices in a doughnut. The attribute explode_all_on_touch just explodes the slices. But , I want to open a different page on clicking any of the slices. How can I achieve this?? Please help me out.

1 Reply

PS Parthiban Sundaram Syncfusion Team August 28, 2017 10:20 AM UTC

Hi Aman,

Thanks for using Syncfusion Products.

We have achieved your requirement using SelectionChanging event in SfChart to navigate the different page. Please find the below code snippet for more details.

Code Snippet:
XAML Code:  
  <chart:SfChart SelectionChanging="Chart_SelectionChanging">  
<chart:DoughnutSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue" EnableDataPointSelection="true">  
        privatevoid Chart_SelectionChanging(object sender, ChartSelectionChangingEventArgs e)  
             e.Cancel = true// Disables the datapoint selection  

Sample: http://www.syncfusion.com/downloads/support/forum/132309/ze/DoughnutSample-102519379  

Please refer the below UG link for enabling or disabling the data point selection.


Please let us know, if you need further assistance on this.

Parthiban S

Live Chat Icon For mobile
Up arrow icon