Back to Devexpress

AxisLabel3DItem Class

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

latest3.9 KB
Original Source

AxisLabel3DItem Class

Represents an individual axis label item within 3D chart types.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public class AxisLabel3DItem :
    AxisLabelItemBase
vb
Public Class AxisLabel3DItem
    Inherits AxisLabelItemBase

Remarks

The AxisLabel3DItem class inherits settings that define the functionality of an individual axis label item (obtained in the special ChartControl.CustomDrawAxisLabel or WebChartControl.CustomDrawAxisLabel event handler) from the AxisLabelItem class.

In this event, you can use the CustomDrawAxisLabelEventArgs.Item property to obtain an axis label item’s axis value (or internal value, if it’s needed), its font and appearance settings, and also access the properties of the associated axis itself. And, to meet the specifics of 3D chart types, the AxisLabel3DItem class introduces two more properties: AxisLabel3DItem.Angle (determines the angle by which the text of a 3D XY-Diagram’s axis label item is rotated) and AxisLabel3DItem.TextPosition (specifies the position of axis label items relative to the axis).

For more information, refer to Axis Labels.

Example

This example demonstrates how 3D chart types axis label items can be obtained in the ChartControl.CustomDrawAxisLabel event. Note that in order to access their 3D-specific properties, you should cast the object returned by the CustomDrawAxisLabelEventArgs.Item property to the AxisLabel3DItem type.

csharp
using DevExpress.XtraCharts;
// ...

private void chartControl1_CustomDrawAxisLabel(object sender, 
CustomDrawAxisLabelEventArgs e) {
    AxisLabel3DItem item = (AxisLabel3DItem)e.Item;

    item.Angle = -25;
    item.TextPosition = AxisLabel3DPosition.Bottom;
}
vb
Imports DevExpress.XtraCharts
' ...

Private Sub ChartControl1_CustomDrawAxisLabel(ByVal sender As System.Object, _ 
ByVal e As CustomDrawAxisLabelEventArgs) Handles ChartControl1.CustomDrawAxisLabel
    Dim item As AxisLabel3DItem = CType(e.Item, AxisLabel3DItem)

    item.Angle = -25;
    item.TextPosition = AxisLabel3DPosition.Auto
End Sub

Inheritance

Object AxisLabelItemBase AxisLabel3DItem

See Also

AxisLabel3DItem Members

3D Series Views

Axis Labels

DevExpress.XtraCharts Namespace