Repositioned AdditionalYAxes have Incorrect Title Rotation

2 posts, 0 answers
  1. Katherine
    Katherine avatar
    5 posts
    Member since:
    Aug 2012

    Posted 04 May 2011 Link to this post


    I've run into a strange issue that doesn't seem to be solvable with the currently exposed style settings on RadChart. I'm using the template for the ChartArea presented on (as well as a couple other threads around this forum).

    By default, using that template, the YAxes defined in AdditionalYAxes do not have their ticks displayed on the right hand side (as the primary y axis does). The only way I have found to get the axis ticks to display on the right hand side of the additional axes is by setting FlowDirection="RightToLeft" on the AdditionalYAxesContainer control.

    This works great, but leads to an issue where the axis titles for the additional axes are inverted with respect to the axis title for the primary y axis. I'm wondering if there is any way around this.

    Thanks for your time,
    Loren Van Spronsen
  2. Evgenia
    Evgenia avatar
    1437 posts

    Posted 09 May 2011 Link to this post

    Hi Loren,

    You can rotate the Titles for the Additional YAxes by retemplating the AxisTitle Style like this:
    <Style x:Key="CustomTitle" TargetType="telerikCharting:AxisTitle">
                <Setter Property="BorderStyle">
                        <Style TargetType="Border">
                            <Setter Property="Margin" Value="0,5,0,0" />
                            <Setter Property="CornerRadius" Value="2" />
                            <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
                            <Setter Property="RenderTransform">
                                    <RotateTransform Angle="180" />

    Set the Style in code-behind like this:

    foreach (var item in RadChart1.DefaultView.ChartArea.AdditionalYAxes)
                  item.AxisStyles.TitleStyle = this.Resources["CustomTitle"] as Style;

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top