Highlight on Mouse over

2 posts, 0 answers
  1. Warren
    Warren avatar
    4 posts
    Member since:
    Mar 2014

    Posted 12 Mar 2014 Link to this post

    I would like to highlight items in my charts when a user moves the mouse over them. For example, placing a border around a bar on a bar series or changing the color of a data point on a line series. When the user moves the mouse off of the item then it would return to it's normal appearance. Does anyone know how I can achieve this?
  2. Martin Ivanov
    Martin Ivanov avatar
    1446 posts

    Posted 17 Mar 2014 Link to this post

    Hi Warren,

    I think the Selection demo from our UI for WPF demos will be helpful for your scenario. You can find it under the RadChartView --> Selection section. 

    Basically you can set a PointTemplate on your series and then you can handle the MouseLeave and MouseEnter events on the UIElement placed in the template.
    <telerik:BarSeries ItemsSource="{Binding Items}"
                <Border Background="LightCoral"
    Here are the handlers:
    private void Border_MouseEnter(object sender, MouseEventArgs e)
        Border border = sender as Border;
        border.BorderBrush = Brushes.LightSeaGreen;
        border.BorderThickness = new Thickness(5);
    private void Border_MouseLeave(object sender, MouseEventArgs e)
        Border border = sender as Border;
        border.BorderBrush = null;
        border.BorderThickness = new Thickness(0);

    In addition I prepared a sample project which demonstrates this approach.

    Please let me know if this fits well in your scenario.


    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Back to Top