Skip to main content

ChartView.AxisY Property

Provides access to the chart’s y-axis (axis of values). This is a bindable property.

Namespace: DevExpress.Maui.Charts

Assembly: DevExpress.Maui.Charts.dll

NuGet Package: DevExpress.Maui.Charts

Declaration

public NumericAxisY AxisY { get; set; }

Property Value

Type Description
NumericAxisY

The axis of values.

Remarks

ChartView automatically creates a numeric scale of the y-axis based on associated series data. To customize the y-axis, assign a NumericAxisY object with the specified axis settings to the AxisY property. For example, you can change the axis range and scale parameters, customize axis labels and title, add tickmarks, grid lines, constant lines and strips to the axis.

Y-Axis Elements

<dxc:ChartView>
  <dxc:ChartView.AxisY>
      <dxc:NumericAxisY GridAlignment="10">
          <dxc:NumericAxisY.Range>
              <dxc:NumericRange VisualMax="100" VisualMin="40"/>
          </dxc:NumericAxisY.Range>
          <dxc:NumericAxisY.Title>
              <dxc:AxisTitle Text="Humidity, %" Alignment="Center">
                  <dxc:AxisTitle.Style>
                      <dxc:TitleStyle>
                          <dxc:TitleStyle.TextStyle>
                              <dxc:TextStyle Size="24"/>
                          </dxc:TitleStyle.TextStyle>
                      </dxc:TitleStyle>
                  </dxc:AxisTitle.Style>
              </dxc:AxisTitle>
          </dxc:NumericAxisY.Title>
          <dxc:NumericAxisY.Style>
              <dxc:AxisStyle MajorTickmarksVisible="True" MinorTickmarksVisible="True" 
                             MajorGridlinesVisible="True"/>
          </dxc:NumericAxisY.Style>
          <dxc:NumericAxisY.ConstantLines>
              <dxc:NumericConstantLine AxisValue="{Binding HumidityMaxValue}" ShowBehind="True">
                  <dxc:NumericConstantLine.Title>
                      <dxc:ConstantLineTitle Text="Max Humidity" Visible="True" 
                                             ShowBelowLine="False" Alignment="Far">
                          <dxc:ConstantLineTitle.Style>
                              <dxc:TitleStyle>
                                  <dxc:TitleStyle.TextStyle>
                                      <dxc:TextStyle Size="24" Color="Black"/>
                                  </dxc:TitleStyle.TextStyle>
                              </dxc:TitleStyle>
                          </dxc:ConstantLineTitle.Style>
                      </dxc:ConstantLineTitle>
                  </dxc:NumericConstantLine.Title>
                  <dxc:NumericConstantLine.Style>
                      <dxc:ConstantLineStyle Thickness="2" Stroke="Red"/>
                  </dxc:NumericConstantLine.Style>
              </dxc:NumericConstantLine>
          </dxc:NumericAxisY.ConstantLines>
      </dxc:NumericAxisY>
  </dxc:ChartView.AxisY>
</dxc:ChartView>
See Also