Chart and Label's spacing

2 posts, 1 answers
  1. Johnny
    Johnny avatar
    4 posts
    Member since:
    Sep 2013

    Posted 10 Nov 2013 Link to this post

    The spacing of "RadCartesianChart" and label is too large(i.e  the attachment)

    Can I decrease the spacing  behind C#?

  2. Answer
    Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 13 Nov 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top