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

Chart and Label's spacing

1 Answer 30 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Johnny
Top achievements
Rank 1
Johnny asked on 11 Nov 2013, 03:00 AM
The spacing of "RadCartesianChart" and label is too large(i.e  the attachment)

Can I decrease the spacing  behind C#?

1 Answer, 1 is accepted

Sort by
0
Accepted
Evgenia
Telerik team
answered on 13 Nov 2013, 11:07 AM
Hello Johny,

You can achieve this if you tweak the axis label Margin via LabelTemplate. For example:
   <DataTemplate x:Key="axisLabelTemplate">
            <TextBlock Text="{Binding}"
                           TextAlignment="Center"
                           Margin="0,-2,0,0"/>
        </DataTemplate>
 
//and the axis where the template gets applied
 
   <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis x:Name="horizontalAxis"
                                              LabelTemplate="{StaticResource axisLabelTemplate}"
                </telerik:LinearAxis>
  </telerik:RadCartesianChart.HorizontalAxis>

I hope this information helps.

Regards,
Evgenia
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Chart
Asked by
Johnny
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or