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

Axis.BaseTimeUnit Property

Gets or sets the base unit for the date axis.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v24.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

AxisTimeUnits BaseTimeUnit { get; set; }

#Property Value

Type Description
AxisTimeUnits

An AxisTimeUnits enumeration value specifying the base time unit.

Available values:

Name Description
Auto

Specifies that the time unit for the date axis should be set automatically.

Days

Specifies that days should be used as the time unit for the date axis, so the chart data will be plotted along the axis in days.

Months

Specifies that months should be used as the time unit for the date axis, so the chart data will be plotted along the axis in months.

Years

Specifies that years should be used as the time unit for the date axis, so the chart data will be plotted along the axis in years.

#Remarks

The base unit is a fundamental unit that specifies how to plot data along the date axis: in days, months, or years. By default, the BaseTimeUnit property is set to AxisTimeUnits.Auto, so the base unit is evaluated automatically based on the smallest difference between any two dates in a worksheet.

You can also specify the time unit for major and minor tick marks on the axis by utilizing the Axis.MajorTimeUnit and Axis.MinorTimeUnit properties. To set the distance between these tick marks, use the Axis.MajorUnit and Axis.MinorUnit properties.

See Also