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

Detect Pie Chart Click

Hi, I want to be able to detect when user has clicked on a pie piece and then explode that piece out. I know how to explode a pie piece out but cant figure out how to detect whe na user has clicked on a pie segment

1 Reply

MK Muneesh Kumar G Syncfusion Team January 23, 2019 06:15 AM UTC

Hi Hung,  
 
Thanks for your using Syncfusion products.  
 
We have analyzed your requirement and you can achieve this by setting ExplodeOnMouseClick as true in series as per the below code snippet.  
 
Code snippet 
<chart:SfChart   x:Name="chart" > 
 
            <chart:PieSeries XBindingPath="XValue"  
                             ExplodeOnMouseClick="True" 
                             YBindingPath="YValue" ItemsSource="{Binding Data}"/> 
        </chart:SfChart> 
 
Screenshot: 
 
 
 
 
 
Hope it helps you.  
   
Regards,   
Muneesh Kumar G.    
 


Loader.
Live Chat Icon For mobile
Up arrow icon