3 Answers, 1 is accepted
0
Accepted
Hello,
Yes, it can be done by creating a style targeting the AxisTitle and using the ToolTipService.ToolTip property to set the text you would like. See the code below as an example:
and then use the TitleStyle property of the AxisX to apply the style, like this:
Using the above approach will show a tooltop when user hovers the axis title.
More about tooltips can be found here.
Hope this helps.
Regards,
Peshito
the Telerik team
Yes, it can be done by creating a style targeting the AxisTitle and using the ToolTipService.ToolTip property to set the text you would like. See the code below as an example:
<
UserControl.Resources
>
<
Style
x:Key
=
"chartTitleStyle"
TargetType
=
"telerik:AxisTitle"
>
<
Setter
Property
=
"ToolTipService.ToolTip"
Value
=
"My axis tooltip text here"
/>
</
Style
>
radChart.DefaultView.ChartArea.AxisX.Title = "Axis Title";
radChart.DefaultView.ChartArea.AxisX.AxisStyles.TitleStyle = this.Resources["chartTitleStyle"] as Style;
Using the above approach will show a tooltop when user hovers the axis title.
More about tooltips can be found here.
Hope this helps.
Regards,
Peshito
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
scorp
Top achievements
Rank 1
answered on 15 May 2012, 03:55 PM
Thanks that worked. Is there a way to increase the font size of the tooltip?
0
Hi,
You can increase the size of the tooltip's text by using RadToolTipService instead of ToolTipService. Then using RadToolTipService.ToolTipContentTemplate property you can create your own template like this:
Hope this helps.
Greetings,
Peshito
the Telerik team
You can increase the size of the tooltip's text by using RadToolTipService instead of ToolTipService. Then using RadToolTipService.ToolTipContentTemplate property you can create your own template like this:
<
UserControl.Resources
>
<
Style
x:Key
=
"chartTitleStyle"
TargetType
=
"telerik:AxisTitle"
>
<
Setter
Property
=
"telerik:RadToolTipService.ToolTipContentTemplate"
>
<
Setter.Value
>
<
DataTemplate
>
<
Grid
MaxWidth
=
"200"
>
<
Rectangle
Margin
=
"0"
RadiusX
=
"2"
RadiusY
=
"2"
Fill
=
"Brown"
/>
<
Rectangle
Margin
=
"2"
RadiusX
=
"2"
RadiusY
=
"2"
Fill
=
"Beige"
/>
<
TextBlock
Margin
=
"5"
TextWrapping
=
"Wrap"
FontFamily
=
"Comic Sans MS"
Text
=
"My Tooltip text"
/>
</
Grid
>
</
DataTemplate
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"telerik:RadToolTipService.ToolTipContent"
Value
=
"TEST"
/>
</
Style
>
</
UserControl.Resources
>
Hope this helps.
Greetings,
Peshito
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>