Legend Title

3 posts, 0 answers
  1. Abdulhameed
    Abdulhameed avatar
    27 posts
    Member since:
    Jul 2010

    Posted 27 Oct 2010 Link to this post

    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. Yavor
    Admin
    Yavor avatar
    401 posts

    Posted 29 Oct 2010 Link to this post

    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
  3. Abdulhameed
    Abdulhameed avatar
    27 posts
    Member since:
    Jul 2010

    Posted 30 Oct 2010 Link to this post

    Thanks very much
Back to Top