RadChart - ToolTip for X axis itself

2 posts, 1 answers
  1. Dima
    Dima avatar
    6 posts
    Member since:
    Oct 2014

    Posted 02 Oct 2014 Link to this post

    Hello, I'm working on a WPF application and using the RadChart control.
    I'm familiar with the ItemToolTipFormat and DataPointMember="Tooltip" features, but I wonder if the following is possible:

    I've attached an image for demonstration:
    Is it possible that when I hover with the mouse cursor on the x axis categories, I'll get a tooltip:
    For example: In the attached image, when I hover on the word May (or Sep or Nov and etc) with the mouse cursor, I will then get a tooltip.

    What happens with the mentioned features above, I get a tooltip on the diagram itself, but as mentioned, I want a tooltip on the category itself on the x axis (when I hover on the months' words as displayed in the image).

    Thank you in advance for your help!
     

  2. Answer
    Martin
    Admin
    Martin avatar
    1101 posts

    Posted 06 Oct 2014 Link to this post

    Hi Dima,

    In order to add a tool tip for the axes' labels you can define an ItemLabelStyle for them. Here is an example in code:

    <telerik:ChartArea.AxisX>
        <telerik:AxisX>
            <telerik:AxisX.AxisStyles>
                <telerik:AxisStyles>
                    <telerik:AxisStyles.ItemLabelStyle>
                        <Style TargetType="TextBlock">
                            <Setter Property="telerik:RadToolTipService.ToolTipContent" Value="{Binding Label}" />
                        </Style>
                    </telerik:AxisStyles.ItemLabelStyle>
                </telerik:AxisStyles>                                      
            </telerik:AxisX.AxisStyles>
        </telerik:AxisX>
    </telerik:ChartArea.AxisX>

    Please give this approach a try and let me know if it works for you.

    Regards,
    Martin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top