Skip to main content

Series.AxisY Property

Gets or sets a numeric axis Y for the series.

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll

NuGet Package: DevExpress.XamarinForms.Charts

Declaration

public NumericAxisY AxisY { get; set; }

Property Value

Type Description
NumericAxisY

A numeric axis Y for a specific series.

Remarks

A chart contains two axes: an axis of arguments (X-axis) and a numeric axis of values (Y-axis). You can set them with the ChartView.AxisX and ChartView.AxisY properties.

At the chart level, you can specify a single axis X and a single axis Y. In some scenarios, these two axes are not enough. For example, it’s required to display series of different ranges of values on the same chart, or have different arguments or values within a single diagram. In these cases, to increase data readability, you can associate each series on your chart with a separate axis. To do this, use the Series.AxisX or Series.AxisY properties.

Several series can share an axis. To achieve that, first add an axis object to the resource dictionary, and then assign it to the AxisX or AxisY property of all required series.

To change the position and layout of an axis, use its DisplayPosition and Layout properties.

Example

If you plot a chart where one series displays large values, trends in other series will become harder to analyze. To increase data readability, enable a separate axis for the series with smaller values.

Multiple Axes

<dxc:ChartView>
    <dxc:ChartView.Series>
        <dxc:LineSeries>
            <!--...-->
        </dxc:LineSeries>

        <dxc:LineSeries>
            <dxc:LineSeries.AxisY>
                <dxc:NumericAxisY GridAlignment="2" Position="Far">
                    <dxc:NumericAxisY.Style>
                        <dxc:AxisStyle LineVisible="True" LineThickness="2" LineColor="#ff4f85"/>
                    </dxc:NumericAxisY.Style>
                </dxc:NumericAxisY>
            </dxc:LineSeries.AxisY>
            <!--...-->
        </dxc:LineSeries>
    </dxc:ChartView.Series>

    <dxc:ChartView.AxisY>
        <dxc:NumericAxisY GridAlignment="200">
            <dxc:NumericAxisY.Style>
                <dxc:AxisStyle LineVisible="True" LineThickness="2" LineColor="#41bef4"/>
            </dxc:NumericAxisY.Style>
        </dxc:NumericAxisY>
    </dxc:ChartView.AxisY>
</dxc:ChartView>
See Also