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

Chart Axis title Z index

1 Answer 57 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Venkatesh
Top achievements
Rank 1
Venkatesh asked on 28 Mar 2012, 07:47 PM
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>

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 02 Apr 2012, 02:09 PM
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 >>
Tags
Chart
Asked by
Venkatesh
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or