Axis2D.Alignment Property
Gets or sets the axis alignment. This is a dependency property.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v20.1.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Charts, DevExpress.Wpf.Charts
Declaration
Property Value
Type | Description |
---|---|
AxisAlignment | An AxisAlignment enumeration value that specifies the axis alignment. |
Available values:
Name | Description |
---|---|
Near | The axis is displayed at the left or bottom side of the diagram, depending on its type and orientation. |
Far | The axis is displayed at the right or top side of the diagram, depending on its type and orientation. |
Zero | The axis intercepts another primary axis at the zero level. This alignment type is applicable to primary axes only. The zero level passes through the zero for an axis of values and depends on a series SeriesBase.ScaleType property value for an axis of arguments: - for the ScaleType.Qualitative scale, the zero level is specified by the first point’s argument, - for the ScaleType.Numerical scale, the zero level equals the zero value, - for the ScaleType.DateTime scale, the zero level is equal to the earliest date. |
Center | The axis is positioned in the center of chart plot area. This alignment type is applicable to primary axes only. |
Remarks
The following table lists all the possible Alignment values:
Value | The Example Image |
---|---|
Center | |
Far | |
Near | |
Zero |
Example
This example illustrates how to configure the axis element appearance and layout:
The following markup configures options of a y-axis to resemble to its appearance in the image above:
<dxc:XYDiagram2D.AxisY>
<dxc:AxisY2D TitlePosition="Outside"
LabelPosition="Inside"
LabelAlignment="Far"
Alignment="Near">
<dxc:AxisY2D.NumericScaleOptions>
<dxc:ContinuousNumericScaleOptions AutoGrid="False"
GridSpacing="10"/>
</dxc:AxisY2D.NumericScaleOptions>
<dxc:AxisY2D.WholeRange>
<dxc:Range dxc:AxisY2D.AlwaysShowZeroLevel="False"/>
</dxc:AxisY2D.WholeRange>
<dxc:AxisY2D.Label>
<dxc:AxisLabel TextPattern="{}{V} °F"
FontSize="10"/>
</dxc:AxisY2D.Label>
<dxc:AxisY2D.Title>
<dxc:AxisTitle Content="Temperature"
Visible="True"
Alignment="Center"
FontSize="12"/>
</dxc:AxisY2D.Title>
</dxc:AxisY2D>
</dxc:XYDiagram2D.AxisY>
The following table lists the API members the example above uses:
Member | Description |
---|---|
Axis2D.TitlePosition | Gets or sets the axis title position. |
Axis2D.LabelPosition | Gets or sets the axis label position. |
Axis2D.LabelAlignment | Gets or sets the axis label alignment. This is a dependency property. |
Axis2D.Alignment |
Gets or sets the axis alignment. This is a dependency property. |
AxisY2D.NumericScaleOptions | Provides access to the options that define the behavior of a numeric Y-scale when its mode is continuous. |
ContinuousNumericScaleOptions | Contains settings for numeric axis data when its scale mode is continuous. |
Axis.WholeRange | Gets or sets the range through which it’s possible to scroll an axis. |
Range | Contains the common settings that define the range displayed by an axis. |
AxisBase.Label | Specifies axis label settings. |
AxisLabel | Contains settings for axis labels. |
Axis.Title | Provides access to the title settings of an axis. |
AxisTitle | Defines the common settings of an axis title. |
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Alignment 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.