XYDiagram.AxisY Property
Gets the Y-axis.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v22.2.dll
NuGet Package: DevExpress.Charts
Declaration
[XtraChartsLocalizableCategory(XtraChartsCategory.Elements)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public AxisY AxisY { get; }
Property Value
Type | Description |
---|---|
AxisY | An AxisY object which represents the Y Axis. |
Remarks
For more information on axes, see the Axis topic.
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 |
---|---|
AxisTitle.Position | Gets or sets the axis title position. |
Title.Text | Gets or sets the title’s text. |
AxisTitle.Alignment | Gets or sets the alignment of the axis title. |
AxisLabel2D.Alignment | Gets or sets the axis label alignment. |
Axis2D.LabelPosition | Gets or sets the axis label position. |
AxisLabel.TextPattern | Gets or sets a string that formats text for the auto-generated x- or y-axis labels. |
Axis2D.Alignment | Specifies the position of an axis relative to another primary axis. |
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AxisY property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.