Back to Devexpress

DateTimeAxisX.Range Property

maui-devexpress-dot-maui-dot-charts-dot-datetimeaxisx-d3f77b63.md

latest2.4 KB
Original Source

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

csharp
public DateRange Range { get; set; }

Property Value

TypeDescription
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.

xml
<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

DateTimeAxisX Class

DateTimeAxisX Members

DevExpress.Maui.Charts Namespace