This is a migrated thread and some comments may be shown as answers.

RadChart - ToolTip for X axis itself

1 Answer 75 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dmitri
Top achievements
Rank 1
Dmitri asked on 02 Oct 2014, 10:08 AM
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!
 

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 06 Oct 2014, 02:40 PM
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.

 
Tags
Chart
Asked by
Dmitri
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or