WorkdaysOptions.ExactWorkdays Property

Specifies strict workdays that don't depend on the WorkdaysOptions.Holidays and WorkdaysOptions.Workdays properties settings.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll

Declaration

[PersistenceMode(PersistenceMode.InnerProperty)]
public KnownDateCollection ExactWorkdays { get; }
<PersistenceMode(PersistenceMode.InnerProperty)>
Public ReadOnly Property ExactWorkdays As KnownDateCollection

Property Value

Type Description
KnownDateCollection

A KnownDateCollection object, that stores the information about strict workdays.

Property Paths

You can access this nested property as listed below:

Show 25 property paths
Object Type Path to ExactWorkdays
Axis
Axis2D
Axis3D
AxisBase
AxisX
AxisX3D
AxisXBase
AxisY
AxisY3D
AxisYBase
DateTimeScaleOptions
.WorkdaysOptions.ExactWorkdays
GanttAxisX
PolarAxisX
RadarAxis
RadarAxisX
RadarAxisY
SecondaryAxisX
SecondaryAxisY
SwiftPlotDiagramAxis
SwiftPlotDiagramAxisX
SwiftPlotDiagramAxisXBase
SwiftPlotDiagramAxisY
SwiftPlotDiagramAxisYBase
SwiftPlotDiagramSecondaryAxisX
SwiftPlotDiagramSecondaryAxisY

Remarks

Apart from specifying the workdays within the week (via the WorkdaysOptions.Workdays property), you can define strict workdays (which have priority over the WorkdaysOptions.Holidays property setting), via the ExactWorkdays property.

For more information, refer to Data Aggregation.

Examples

This example demonstates how to exclude non-working days (weekdays and holidays) from an axis range, via the AxisBase.WorkdaysOnly and AxisBase.WorkdaysOptions properties.

using System;
using System.Windows.Forms;
using DevExpress.XtraCharts;
// ...
AxisX axisX = ((XYDiagram)chartControl1.Diagram).AxisX;

// Exclude holidays from the axis scale.
axisX.WorkdaysOnly = true;

// Specify custom working days.
axisX.WorkdaysOptions.Workdays = Weekday.Sunday | Weekday.Monday | Weekday.Tuesday |
    Weekday.Wednesday | Weekday.Thursday | Weekday.Friday;

// Specify holidays
axisX.WorkdaysOptions.Holidays.AddRange(new KnownDate[] {
    new KnownDate("Custom Holiday 1", new DateTime(1994, 3, 2, 0, 0, 0, 0)),
    new KnownDate("Custom Holiday 2", new DateTime(1994, 4, 2, 0, 0, 0, 0))});

// Specify strict working days.
// Thay will have a priority over the holidays specified.
axisX.WorkdaysOptions.ExactWorkdays.Add(
    new KnownDate("Community Work Day", new DateTime(1994, 3, 2, 0, 0, 0, 0)));
See Also