Skip to main content
A newer version of this page is available. .

DateTimeScaleOptions.SkipRangesWithoutPoints Property

Specifies whether to skip axis ranges that do not have data points.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v21.2.dll

NuGet Package: DevExpress.Charts

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public bool SkipRangesWithoutPoints { get; set; }

Property Value

Type Description
Boolean

true to skip ranges without points; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to SkipRangesWithoutPoints
AxisBase
.DateTimeScaleOptions .SkipRangesWithoutPoints

Remarks

Use the SkipRangesWithoutPoints option to exclude all date-time axis ranges without data points. If your goal is to display work days/time only, enable the WorkdaysOnly and WorkTimeOnly properties instead. See the following topic for more information: Work Time and Workday Configuration.

The following images show a chart with different SkipRangesWithoutPoints values:

Property Value

Example

SkipRangesWithoutPoints = true

chart-control/skip-ranges-without-points-true

SkipRangesWithoutPoints = false (Default)

chart-control/skip-ranges-without-points-false

Example:

XYDiagram diagram = chartControl1.Diagram as XYDiagram;
diagram.AxisX.DateTimeScaleOptions.SkipRangesWithoutPoints = true;

The following example demonstrates how you can exclude weekends and holidays from the X-axis range:

View Example: Charts - How to exclude weekends and holidays from the axis range

See Also