This is a migrated thread and some comments may be shown as answers.
ChartLegend Tooltip
1 Answer 32 Views
This is a migrated thread and some comments may be shown as answers.
Philip Ashworth
Top achievements
Rank 1
Philip Ashworth asked on 18 Feb 2010, 03:31 PM

Is it possible to display a tooltip over a chart legend item?
I have a max width on the chart legends, some of the long names are cut off. I wanted to provide a tooltip to display the full name, is it possible?

Thanks Phil.

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 23 Feb 2010, 08:33 AM
Hello Philip Ashworth,

Currently you need to re-template the ChartLegendItem. Here is a sample style:
<Style TargetType="telerikCharting:ChartLegendItem">
    <Setter Property="Foreground" Value="{StaticResource LegendForeground}" />
    <Setter Property="MarkerStrokeThickness" Value="{StaticResource LegendItemMarkerStrokeThickness}" />
    <Setter Property="Template" >
            <ControlTemplate TargetType="telerikCharting:ChartLegendItem">
                <Grid HorizontalAlignment="Stretch" VerticalAlignment="Top" ToolTipService.ToolTip="{TemplateBinding Label}">
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition />
                    <Rectangle x:Name="PART_LegendItemMarker"
                               StrokeThickness="{TemplateBinding MarkerStrokeThickness}"
                               Style="{TemplateBinding ItemStyle}" />
                    <TextBlock Grid.Column="1"
                               Foreground="{TemplateBinding Foreground}"
                               Text="{TemplateBinding Label}" />

Then set this style through the RadChart.DefaultView.ChartLegend.LegendItemStyle property.

the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Asked by
Philip Ashworth
Top achievements
Rank 1
Answers by
Telerik team
Share this question