AxisX Item Label Large Font Size with Rotation Causes Clipping

3 posts, 0 answers
  1. Aaron
    Aaron avatar
    14 posts
    Member since:
    Feb 2012

    Posted 08 Mar 2012 Link to this post

    My AxisX value is a Date.  I increased the Font Size of the AxisX Item Label and rotated it by -40 degrees and this is causing the first part of each label to be clipped (can not be seen).

    How do I increase the height of the AxisX?  Alternatively, can this be accomplished through padding so that the Height needed would not need to be known for the Font Size to change?

    Please see attached for example.

    -Aaron Hoffman
  2. Nikolay
    Nikolay avatar
    384 posts

    Posted 13 Mar 2012 Link to this post

    Hi Aaron,

    Generally the ChartArea resizes accordingly when longer X-Axis labels are to be displayed or when the font size is larger, so the effect would be that the ChartArea itself is being shrinked. It seems like this does not happen in your case, so perhaps we are missing some of the details of your specific scenario. Could you, please, open a support ticket and send us a small sample application, which reproduces the issue you've encountered, so that we could have a look at your code and provide a solution.

    Kind regards,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
  4. Aaron
    Aaron avatar
    14 posts
    Member since:
    Feb 2012

    Posted 30 Mar 2012 Link to this post

    I opened a support ticket and the resolution was to set the Margin in the Style as well, in addition to the rotation and FontSize.

    <Style x:Key="AxisItemLabelDateOffset" TargetType="TextBlock">
    	<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
    	<Setter Property="RenderTransform">
    			<CompositeTransform TranslateX="-30" TranslateY="14" Rotation="-45"/>
    	<Setter Property="FontSize" Value="12"></Setter>
    	<Setter Property="Margin" Value="20,6,0,32"></Setter>

    Note: This solution can still allow the AxisX Item Label to be clipped on the extreme ends of the AxisX, if it goes out to the left past the AxisY.
Back to Top