AxisLabel2D Class
In This Article
Defines the settings of 2D-axis labels.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
NuGet Package: DevExpress.Charts
#Declaration
#Related API Members
The following members return AxisLabel2D objects:
#Remarks
In addition to the options that the AxisLabel provides, the AxisLabel2D
introduces the AxisLabel2D.Alignment property that specifies the label alignment.
#Example
This example configures the axis label and axis title appearance.
The following code configures options of a y-axis to resemble to its appearance in the image above:
XYDiagram diagram = chartControl.Diagram as XYDiagram;
diagram.AxisY.Title.Position = AxisTitlePosition.Outside;
diagram.AxisY.Title.Text = "Total Harmonic Distortion";
diagram.AxisY.Title.Alignment = System.Drawing.StringAlignment.Center;
diagram.AxisY.Label.Alignment = AxisLabelAlignment.Far;
diagram.AxisY.LabelPosition = AxisLabelPosition.Inside;
diagram.AxisY.Label.TextPattern = "{V:0.##}%";
diagram.AxisY.Alignment = AxisAlignment.Near;
The following table lists the API members the code above uses:
Member | Description |
---|---|
Axis |
Gets or sets the axis title position. |
Title. |
Gets or sets the title’s text. |
Axis |
Gets or sets the alignment of the axis title. |
Axis |
Gets or sets the axis label alignment. |
Axis2D. |
Gets or sets the axis label position. |
Axis |
Gets or sets a string that formats text for the auto-generated x- or y-axis labels. |
Axis2D. |
Specifies the position of an axis relative to another primary axis. |
#Inheritance
See Also