Can't change report title font size

2 posts, 0 answers
  1. Terry
    Terry avatar
    157 posts
    Member since:
    Jul 2009

    Posted 01 Oct 2009 Link to this post


    My titles are getting truncated in charts, so I want to make the font size (11 by default on my system) smaller.  Neither of the following is working.  Am I using the wrong properties?


                RadChart1.DefaultView.ChartTitle.FontSize = 8.0;       // doesn't work  
                RadChart1.DefaultView.ChartTitle.FontStretch = FontStretches.Condensed;     // doesn't work  
                RadChart1.DefaultView.ChartTitle.Content = "Non-Responses by Payer " + startDate.ToShortDateString()  
                    + " - " + endDate.ToShortDateString();  




  2. Velin
    Velin avatar
    391 posts

    Posted 06 Oct 2009 Link to this post

    Hi Terry,

    Unfortunately, with the current version of the control the FontSize property of the ChartTitle is not template bound, so setting this property to a value does not change anything. This is about to be fixed in the next version of the control.

    In the meanwhile, we can recommend you to use the following code:
    <Style x:Name="ChartTitleStyle" TargetType="chart:ChartTitle"
                    <Setter Property="FontSize" Value="8"/> 
                    <Setter Property="Template" > 
                            <ControlTemplate TargetType="chart:ChartTitle"
                                <Border  Background="{TemplateBinding Background}" 
                                 BorderBrush="{TemplateBinding BorderBrush}" 
                                 BorderThickness="{TemplateBinding BorderThickness}"
                                HorizontalAlignment="{TemplateBinding HorizontalAlignment}" 
                                VerticalAlignment="{TemplateBinding VerticalAlignment}" 
                                Content="{TemplateBinding Content}" 
                                Margin="{TemplateBinding Padding}" 
                                Foreground="{TemplateBinding Foreground}" 
                                FontSize="{TemplateBinding FontSize}" 
                                FontStyle="{TemplateBinding FontStyle}"   
                                FontWeight="{TemplateBinding FontWeight}" 
                                FontFamily="{TemplateBinding FontFamily}" /> 
     RadChart1.TitleStyle = this.ChartTitleStyle; 

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top