Back to Devexpress

AxisLabel3DItem.TextPosition Property

corelibraries-devexpress-dot-xtracharts-dot-axislabel3ditem-79c67389.md

latest4.0 KB
Original Source

AxisLabel3DItem.TextPosition Property

Gets or sets a value that specifies the position of axis label items relative to the axis in 3D series.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[XtraChartsLocalizableCategory(XtraChartsCategory.Layout)]
public AxisLabel3DPosition TextPosition { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Layout)>
Public Property TextPosition As AxisLabel3DPosition

Property Value

TypeDescription
AxisLabel3DPosition

An AxisLabel3DPosition enumeration value, which specifies the position of axis label items relative to the axis.

|

Available values:

NameDescription
Bottom

The axis label is painted at the bottom of the axis point value.

| | Left |

The axis label is painted on the left of the axis point value.

| | Right |

The axis label is painted on the right of the axis point value.

| | Top |

The axis label is painted at the top of the axis point value.

| | Auto |

The axis label’s position is automatically determined by the chart.

|

Remarks

Use the TextPosition property to position an individual axis label item (after it is obtained in the special ChartControl.CustomDrawAxisLabel or WebChartControl.CustomDrawAxisLabel event handler).

Refer to the AxisLabel3DPosition enumeration’s description for a list of the available label positions.

Example

The following code demonstrates how to change the position and angle of an individual AxisLabel3DItem, which is obtained in the special ChartControl.CustomDrawAxisLabel (or, WebChartControl.CustomDrawAxisLabel) event handler.

csharp
using DevExpress.XtraCharts;
// ...

private void chartControl1_CustomDrawAxisLabel(object sender, 
CustomDrawAxisLabelEventArgs e) {
    ((AxisLabel3DItem)e.Item).Angle = -30;
    ((AxisLabel3DItem)e.Item).Antialiasing = true;
    ((AxisLabel3DItem)e.Item).TextPosition = AxisLabel3DPosition.Right;
}
vb
Imports DevExpress.XtraCharts
' ...

Private Sub chartControl1_CustomDrawAxisLabel(ByVal sender As Object, _ 
ByVal e As CustomDrawAxisLabelEventArgs) Handles chartControl1.CustomDrawAxisLabel
    CType(e.Item, AxisLabel3DItem).Angle = -30
    CType(e.Item, AxisLabel3DItem).Antialiasing = True
    CType(e.Item, AxisLabel3DItem).TextPosition = AxisLabel3DPosition.Right
End Sub

See Also

AxisLabel3DItem Class

AxisLabel3DItem Members

DevExpress.XtraCharts Namespace