XYDiagram.AxisX Property

Gets the X-axis.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Elements)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public AxisX AxisX { get; }
<XtraChartsLocalizableCategory(XtraChartsCategory.Elements)>
<PersistenceMode(PersistenceMode.InnerProperty)>
Public ReadOnly Property AxisX As AxisX

Property Value

Type Description
AxisX

An AxisX object which represents the X Axis.

Remarks

For more information on axes, see the Axis topic.

Examples

This example demonstrates how to access and customize axis labels.

// Cast the chart's diagram to the XYDiagram type, to access its axes.
XYDiagram diagram = (XYDiagram)chartControl1.Diagram;

// Customize the X-axis labels' appearance.
diagram.AxisX.Label.Angle = -30;
diagram.AxisX.Label.Staggered = true;
diagram.AxisX.Label.TextColor = Color.Bisque;

// As opposed to the above properties, the following ones
// will not affect custom labels, if they exist for the axes.
diagram.AxisX.Label.BeginText = "Some prefix ";
diagram.AxisX.Label.EndText = " some postfix.";
See Also