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

Legend Title

2 Answers 70 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Abdulhameed
Top achievements
Rank 1
Abdulhameed asked on 27 Oct 2010, 06:29 AM
I would like to hide the Legend Title, I tried to set it to null or empty string and it worked. However the title space is reserved and I would like to remove the empty space.

Any Suggestion?

2 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 29 Oct 2010, 12:35 PM
Hi Abdulhameed,

You can do this by creating a custom data template for the chart's header like this:

<UserControl.Resources>
    <DataTemplate x:Key="template">
        <Grid>
            <TextBlock Visibility="Collapsed" />
        </Grid>
    </DataTemplate>
</UserControl.Resources>

And applying it on the ChartLegend:
this.RadChart1.DefaultView.ChartLegend.HeaderTemplate = this.Resources["template"] as DataTemplate;

You can read more on styling the ChartLegend in our help system in this topic.

Sincerely yours,
Yavor Ivanov
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
0
Abdulhameed
Top achievements
Rank 1
answered on 30 Oct 2010, 08:39 AM
Thanks very much
Tags
Chart
Asked by
Abdulhameed
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Abdulhameed
Top achievements
Rank 1
Share this question
or