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

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

1 Answer 97 Views
Chart
This is a migrated thread and some comments may be shown as answers.
ravi sankar
Top achievements
Rank 1
ravi sankar asked on 17 Dec 2009, 10:26 AM
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
 

1 Answer, 1 is accepted

Sort by
0
Velin
Telerik team
answered on 22 Dec 2009, 11:58 AM
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.
Tags
Chart
Asked by
ravi sankar
Top achievements
Rank 1
Answers by
Velin
Telerik team
Share this question
or