Skip to main content

AxisDisplayPositionRelative Class

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

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll

NuGet Package: DevExpress.XamarinForms.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:

<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