AxisLabel.Angle Property
Gets or sets the angle by which axis labels are rotated.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v24.1.dll
NuGet Package: DevExpress.Wpf.Charts
Declaration
Property Value
Type | Description |
---|---|
Int32 | An angle, in degrees, by which axis labels are rotated. |
Remarks
An axis label’s Angle property is measured in degrees. The Chart Control rotates labels clockwise.
The following table contains a chart with different Angle property values:
Angle=0 | Angle=-30 | Angle=30 |
---|---|---|
The Angle property also specifies rotation for a data template defined in the AxisLabel.ElementTemplate
property:
<Window.Resources>
<DataTemplate x:Key="AxisXLabelTemplate">
<Border BorderThickness="1" CornerRadius="9" Opacity="1.0">
<Border.Background>
<SolidColorBrush Color="LightBlue"/>
</Border.Background>
<Label Content="{Binding Path=Content}"
Padding="5,1,5,1.5"
Foreground="DarkSlateBlue"
FontSize="12" />
</Border>
</DataTemplate>
</Window.Resources>
...
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D Visible="True">
<dxc:AxisX2D.Label>
<dxc:AxisLabel Angle="45"
TextPattern="{}{V} year"
ElementTemplate="{StaticResource AxisXLabelTemplate}"/>
</dxc:AxisX2D.Label>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>
Result:
See Also