Skip to main content

QualitativeAxisX Class

An axis that displays qualitative arguments.

Namespace: DevExpress.Maui.Charts

Assembly: DevExpress.Maui.Charts.dll

NuGet Package: DevExpress.Maui.Charts


public class QualitativeAxisX :


The ChartView chooses the X-axis type depending on data in the first series. If arguments are string values, the chart uses a QualitativeAxisX.

The ChartView.AxisX property allows you to access the automatically created axis. If you need to create and customize axes for individual series, use the Series.AxisX property.

    <!--Specify an X-axis at the chart level-->
        <dxc:QualitativeAxisX />

            <!--Specify an X-axis at the series level-->
                <dxc:QualitativeAxisX />

The QualitativeAxisX class properties allow you to configure the axis range, labels, title, constant lines, strips, gridlines, tickmarks and interlacing colors, and change the axis position.

Qualitative Axis X Elements

Axis Range

The ChartView automatically calculates the axis range based on data series values. To specify a custom range for the axis, set the Range> property to a QualitativeRange object and use the following settings:

  • Min and Max - Specify the entire range of the axis scale. A chart does not visualize data that is out of this range. A user can scroll the chart through this range when scroll is enabled for the X-axis (ChartView.AxisXNavigationMode).
  • VisualMin and VisualMax - Configure the axis scale range visible on the screen.
  • SideMargin - Sets the value of margins on both sides of the axis.

Axis Range

        <dxc:QualitativeRange Min="A" Max="G"
                              VisualMin="B" VisualMax="F"

Axis Labels

To configure axis labels, set the Label property to an AxisLabel object and use the following settings:

  • TextFormat - Specifies the text pattern applied to axis labels.
  • Position - Specifies the position of axis labels.
  • Style - Allows you to access an AxisLabelStyle object that stores label appearance settings (TextStyle).
  • Visible - Allows you to show or hide axis labels.

Axis Label Sample

                        <dxc:TextStyle Size="10"/>

Axis Title

Use the Title property to access an AxisTitle object that stores the following settings of an axis title:

  • Text - Gets or sets the text the title displays. This is a bindable property.
  • Alignment - Gets or sets the alignment of the axis title relative to the axis. This is a bindable property.
  • Style - Allows you to access a TitleStyle object that stores title appearance settings (TextStyle).
  • Visible - Allows you to show or hide the axis title.

Axis Title Sample

        <dxc:AxisTitle Text="Country">
                        <dxc:TextStyle Size="15"/>

Constant Lines

A constant line highlights an axis value as a line perpendicular to the axis.

You can add a constant line to a qualitative X-axis. To do this, add a QualitativeConstantLine object with the specified AxisValue property to the QualitativeAxisX.ConstantLines collection. Use the following properties of the QualitativeConstantLine object to customize the constant line appearance and visibility:

  • Style - Gets or sets the constant line appearance settings. This is a bindable property.
  • ShowBehind - Gets or sets whether the constant line is displayed behind series. This is a bindable property.
  • Title, LegendText - Specify settings of the constant line captions displayed on the chart and in the chart legend.
  • Visible, VisibleInLegend - Specify whether the constant line is visible on the chart and in the chart legend.

Constant Line Sample

        <dxc:QualitativeConstantLine AxisValue="Triassic">
                <dxc:ConstantLineTitle Text="First Dinosaurs">
                                <dxc:TextStyle Color="Green" Size="20"/>
                <dxc:ConstantLineStyle Stroke="Green" Thickness="2"/>


A strip highlights a range between two values of an axis and allows you to trace whether series point values fall in or out of that range. A strip can have its own label that is shown instead of axis labels.

To specify a strip for a qualitative X-axis, add a QualitativeStrip object to the QualitativeAxisX.Strips collection and use the following settings:

Strip for Qualitative Axis X

        <dxc:QualitativeStrip MinLimit="Triassic" MaxLimit="Cretaceous" 
                              LegendText="Mesozoic Era" VisibleInLegend="True">
                <dxc:StripStyle Fill="LightGreen"/>

Axis Appearance

Use the Style property to access an AxisStyle object that stores visibility and appearance settings for the following elements of an axis:



Axis Line

LineVisible, LineColor, LineThickness

Major Tickmarks

MajorTickmarksVisible, MajorTickmarksThickness, MajorTickmarksLength

Minor Tickmarks

MinorTickmarksVisible, MinorTickmarksThickness, MinorTickmarksLength

Major Gridlines

MajorGridlinesVisible, MajorGridlinesColor, MajorGridlinesThickness

Minor Gridlines

MinorGridLinesVisible, MinorGridlinesColor, MinorGridlinesThickness


InterlacedVisible, InterlacedColor


Axis labels, title, constant lines and strips have Style properties that manage the appearance of these elements.

Axis Appearance

        <dxc:AxisStyle LineColor="#757575" LineThickness="2"
                       MajorGridlinesVisible="True" MajorGridlinesColor="#909090"
                       MajorTickmarksVisible="True" MajorTickmarksLength="10" MajorTickmarksThickness="2"
                       MinorTickmarksVisible="True" MinorTickmarksLength="5"
                       InterlacedVisible="True" InterlacedColor="#f1f3f0"/>

Axis Position

Use the DisplayPosition property to specify where an X-axis should be positioned within the chart diagram.

This example anchors an X-axis to the top side of the chart’s plot area:

Axis Position

See Also