Chart Axis title Z index

2 posts, 0 answers
  1. Venkatesh
    Venkatesh avatar
    8 posts
    Member since:
    Dec 2011

    Posted 28 Mar 2012 Link to this post

    I am modifying the position of axis title using the code below so that the tile can be inside the chart area. But we see the title going behind the striplines. Is there a way to set z-index so that chart label is always on top.
    <Thickness x:Key="AxisYTitleMargin">0,0,0,-60</Thickness>
            <Thickness x:Key="AxisXTitleMargin">0,-40,0,0</Thickness>
             
            <Style x:Key="AxisXTitleStyle"  TargetType="telerik:AxisTitle">
                <Setter Property="Margin"  Value="{StaticResource AxisXTitleMargin}" />
            </Style>
            <Style x:Key="AxisYTitleStyle" TargetType="telerik:AxisTitle">
                <Setter Property="Margin"  Value="{StaticResource AxisYTitleMargin}" />
            </Style>

  2. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 02 Apr 2012 Link to this post

    Hello Venkatesh,

    You need to set a value > 0 to the Panel.ZIndex attached property of the AxisXStyle. For example:

    <telerik:RadChart Canvas.ZIndex="2" x:Name="radChart1">
               <telerik:RadChart.DefaultView>
                   <telerik:ChartDefaultView>
                       <telerik:ChartDefaultView.ChartArea>
                           <telerik:ChartArea>
                               <telerik:ChartArea.AxisXStyle>
                                   <Style TargetType="telerik:AxisX2D">
                                       <Setter Property="Panel.ZIndex" Value="1" />
                                   </Style>
                               </telerik:ChartArea.AxisXStyle>
                           </telerik:ChartArea>
                       </telerik:ChartDefaultView.ChartArea>
                   </telerik:ChartDefaultView>
               </telerik:RadChart.DefaultView>
           </telerik:RadChart>

    Greetings,
    Evgenia
    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 banner
Back to Top