AxisBase.DisplayPosition Property
Specifies the axis position.
Namespace: DevExpress.XamarinForms.Charts
Assembly: DevExpress.XamarinForms.Charts.dll
NuGet Package: DevExpress.XamarinForms.Charts
Declaration
public AxisDisplayPositionBase DisplayPosition { get; set; }
Property Value
Type | Description |
---|---|
AxisDisplayPositionBase | The AxisDisplayPositionBase class descendant that specifies the axis position. |
Remarks
To define the axis position within the chart diagram, set the DisplayPosition property to one of the following objects:
AxisDisplayPositionNear - Displays a y-axis on the left side of the plot area, or an x-axis on the bottom.
<dxc:ChartView.AxisY> <dxc:NumericAxisY> <dxc:NumericAxisY.DisplayPosition> <dxc:AxisDisplayPositionNear/> </dxc:NumericAxisY.DisplayPosition> </dxc:NumericAxisY > </dxc:ChartView.AxisY>
AxisDisplayPositionFar - Displays a y-axis on the right side of the plot area, or an x-axis on the top.
<dxc:ChartView.AxisY> <dxc:NumericAxisY> <dxc:NumericAxisY.DisplayPosition> <dxc:AxisDisplayPositionFar/> </dxc:NumericAxisY.DisplayPosition> </dxc:NumericAxisY > </dxc:ChartView.AxisY>
AxisDisplayPositionAbsolute - Anchors an axis to the specified point within the chart diagram.
To specify where to locate an axis, set the AxisDisplayPositionAbsolute.Value property to a double number from 0 to 1 (0 and 1 correspond to the edges of the chart diagram).<dxc:ChartView.AxisY> <dxc:NumericAxisY> <dxc:NumericAxisY.DisplayPosition> <dxc:AxisDisplayPositionAbsolute Value="0.4"/> </dxc:NumericAxisY.DisplayPosition> </dxc:NumericAxisY > </dxc:ChartView.AxisY>
AxisDisplayPositionRelative - Anchors an axis to the specified value of the other (relative) axis.
To specify an axis relative to which the current axis is positioned, use the RelativeAxis property. Then, set the relative axis value (the NumericPosition, DateTimePosition or QualitativePosition property, depending on the relative axis type) where the current axis should cross it.<dxc:ChartView x:Name="chart"> <!-- ChartView.Sereis --> <dxc:ChartView.AxisY> <dxc:NumericAxisY> <dxc:NumericAxisY.DisplayPosition> <dxc:AxisDisplayPositionRelative RelativeAxis="{Binding AxisX, Source={x:Reference chart}}" QualitativePosition="Japan"/> </dxc:NumericAxisY.DisplayPosition> <!-- Other settings of the axis. --> </dxc:NumericAxisY> </dxc:ChartView.AxisY> <dxc:ChartView.AxisX> <dxc:QualitativeAxisX> <!-- Axis settings. --> </dxc:QualitativeAxisX> </dxc:ChartView.AxisX> </dxc:ChartView>