Fixed Width/Height for axis

2 posts, 0 answers
  1. Eric
    Eric avatar
    48 posts
    Member since:
    Jul 2012

    Posted 08 Aug 2012 Link to this post

    Hello,

    I am using a radcartesianview.  Is it possible to make the axis a fixed width height, so the chart doesn't jump when I scroll.  Preferably, this would be the height of the longest named category on the axis.

    Thanks,
    Eric
  2. Rosko
    Admin
    Rosko avatar
    137 posts

    Posted 09 Aug 2012 Link to this post

    Hello Eric,

    What you can do is to set a fixed size for the labels on the axis using a style. Please, refer to the code snippets below. I hope this will help you to achieve the desired effect.
    <Style x:Key="axislabelStyle" TargetType="TextBlock">
       <Setter Property="Height" Value="20"/>
       <Setter Property="Width" Value="20"/>
    </Style>

    <telerik:CategoricalAxis LabelStyle="{StaticResource axisLabelStyle}"/>

    All the best,
    Rosko
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top