Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

C#
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.

#Inheritance

See Also