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

Fixed Width/Height for axis

1 Answer 190 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 08 Aug 2012, 11:52 PM
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

1 Answer, 1 is accepted

Sort by
0
Rosko
Telerik team
answered on 09 Aug 2012, 08:37 AM
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.

Tags
ChartView
Asked by
Eric
Top achievements
Rank 1
Answers by
Rosko
Telerik team
Share this question
or