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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MouseOver on LegendItem

Thread ID:

Created:

Updated:

Platform:

Replies:

145127 Jun 7,2019 01:32 PM UTC Jun 10,2019 09:11 AM UTC WPF 1
loading
Tags: SfChart
Adam
Asked On June 7, 2019 01:32 PM UTC

Hi, how can I get a notification when mouse is over a legend item?

Muneesh Kumar G [Syncfusion]
Replied On June 10, 2019 09:11 AM UTC

Hi Adam, 
 
Greetings from Syncfusion.  
 
We have analyzed your requirement and you can achieve this by raising MouseMove event in ChartLegend and checking the mouse over element DataContext as per the below code snippet.  
 
Code snippet 
 
   <chart:SfChart x:Name="chart" > 
            <chart:SfChart.Legend> 
                <chart:ChartLegend MouseMove="ChartLegend_MouseMove" /> 
            </chart:SfChart.Legend> 
 
 
 
  private void ChartLegend_MouseMove(object sender, MouseEventArgs e) 
        { 
            if(e.OriginalSource is FrameworkElement &&  
                (e.OriginalSource as FrameworkElement ).DataContext is LegendItem) 
            { 
 
            } 
        } 
 
 
Please let us know if you have any other queries.  
 
Regards, 
Muneesh Kumar G 


CONFIRMATION

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

Live Chat Icon For mobile
Live Chat Icon