Skip to main content

AxisDisplayPositionRelative Class

Anchors an axis to the specified value of the other axis.

Namespace: DevExpress.Maui.Charts

Assembly: DevExpress.Maui.Charts.dll

NuGet Package: DevExpress.Maui.Charts

Declaration

public class AxisDisplayPositionRelative :
    AxisDisplayPositionBase

Remarks

Assign the AxisDisplayPositionRelative object to the DisplayPosition property to anchor the axis to the specified value of the other (relative) axis. In this case, the axis is moved together with the associated value of the relative axis when a user scrolls the chart diagram along that relative axis.

Use the following properties of the AxisDisplayPositionRelative object:

DeVexpress MAUI Charts - AxisDisplayPosition - Relative

<dxc:ChartView x:Name="chart">
    <!-- ChartView.Sereis -->

    <dxc:ChartView.AxisY>
      <dxc:NumericAxisY>
          <dxc:NumericAxisY.DisplayPosition>
              <dxc:AxisDisplayPositionRelative 
                      NumericPosition="0" 
                      RelativeAxis="{Binding AxisX, Source={x:Reference chart}}"/>
          </dxc:NumericAxisY.DisplayPosition>
          <!-- Other settings of the axis. -->
      </dxc:NumericAxisY>
    </dxc:ChartView.AxisY>

    <dxc:ChartView.AxisX>
        <dxc:NumericAxisX>
            <!-- Axis settings. -->
        </dxc:NumericAxisX>
    </dxc:ChartView.AxisX>
</dxc:ChartView>

You can also anchor an axis to the specified point of the chart diagram. To do this, set the axis’ DisplayPosition property to the AxisDisplayPositionAbsolute object.

See Also