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

DateTimeAxisX.Range Property

Gets or sets the axis range settings. This is a bindable property.

Namespace: DevExpress.Maui.Charts

Assembly: DevExpress.Maui.Charts.dll

NuGet Package: DevExpress.Maui.Charts

#Declaration

C#
public DateRange Range { get; set; }

#Property Value

Type Description
DateRange

An object that stores range settings for the date-time X-axis.

#Remarks

The ChartView automatically calculates the axis range based on data series values. You can specify a custom range for the axis. To do this, set the DateTimeAxisX.Range property to a DateRange object with the following properties specified:

  • 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 (AxisXNavigationMode).

  • VisualMin and VisualMax - configure the axis scale range currently visible on the screen.

  • SideMargin - sets the value of margins on both sides of the axis.

X-Axis Elements

<dxc:DateTimeAxisX>
    <dxc:DateTimeAxisX.Range>
        <dxc:DateTimeRange Min="1/1/1950" VisualMin="1/1/1970"
                           Max="1/1/2050" VisualMax="1/1/2030" 
                           SideMargin="1"/>
    </dxc:DateTimeAxisX.Range>
</dxc:DateTimeAxisX>

You can also set the DateTimeAxisX.EmptyRangesVisible property to False to hide the ranges of the DateTimeAxisX that contain no data.

See Also