How to change the Font size of numeric Data on chart ?

2 posts, 0 answers
  1. ravi sankar
    ravi sankar avatar
    8 posts
    Member since:
    Nov 2009

    Posted 17 Dec 2009 Link to this post

    Hi
     
    I use barseries definition and line series definition both on single rad chart .
    While viewing the output the numeric data are not able to read ie they are overlapping.

    please  tell the solution  " how to change the font size  of the data on rad chart?"
    i tried in many ways ,but i didnt find solution .
    All the data ie legend,x-axis,y-axis,item are ready to customise,but the particular numeric data is not scalable.

    thanks in adavance 
    ravi
     
  2. Velin
    Admin
    Velin avatar
    391 posts

    Posted 22 Dec 2009 Link to this post

    Hello ravi sankar,

    Unfortunately, RadChart still does not support the intelligent labels feature, which would make the item labels to not overlap. It is in our plans to implement this in one of the next releases of the control.

    Currently, there is not much you can do to overcome this situation and we are really sorry about the inconvenience caused.

    A possible approach could be to try to place the line series labels lower. To do this you should override the style for SeriesItemLabel type. Here is how you van do this:
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
                 xmlns:telerikCharting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting"
     
     <Grid.Resources>
                <Style x:Name="labelStyle"  TargetType="telerikCharting:SeriesItemLabel">
                    <Setter Property="BorderThickness" Value="0" />
                    <Setter Property="HorizontalContentAlignment" Value="Center" />
                    <Setter Property="Template" >
                        <Setter.Value>
                            <ControlTemplate TargetType="telerikCharting:SeriesItemLabel">
                                <Canvas>
                                    <Border
                                Canvas.Top="20"
                                Canvas.Left="{TemplateBinding TextContainerCanvasLeft}"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}">
                                        <TextBlock x:Name="PART_TextContainer"
                                TextAlignment="{TemplateBinding HorizontalContentAlignment}"        
                                Margin="{TemplateBinding Padding}"                      
                                Text="{TemplateBinding Content}"/>
                                    </Border>
                                </Canvas>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Grid.Resources>
     
    //Code behind
    ISeriesDefinition def = new LineSeriesDefinition() {SeriesItemLabelStyle=this.labelStyle };

    Hope this will help.

    Kind regards,
    Velin
    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