[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Collapse]Charts Suite
   [Collapse]Chart Control
    [Expand]Getting Started
    [Expand]Fundamentals
    [Collapse]Providing Data
      Create a Series Manually
      Add Points to a Series Manually
      Bind a Series to a Data Source
      Define a Template for Automatic Series
      Series Scale Types
      Data Aggregation
      Data Filtering
      Colorizers
      Work Time and Workday Configuration
      Top N and Others
    [Expand]Chart Elements
    [Expand]Appearance Customization
    [Expand]End-User Features
    [Expand]Design-Time Features
    [Expand]Examples
    [Expand]Additional Resources
   [Expand]Chart3D Control
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Work Time and Workday Configuration

This document explains how to exclude non-working days and time from the date-time x-axis scale.

Expanded Exclude Non-Working Days

Workdays Options allow you to exclude non-working days or add strict workdays.

DateTimeScaleOptionsBase.WorkdaysOnly = false DateTimeScaleOptionsBase.WorkdaysOnly = true

The following markup shows how to configure the workdays options.

The markup above uses the following classes and properties to specify workdays.

Class or Property Description
DateTimeScaleOptionsBase.WorkdaysOnly Specifies whether holidays and non-working days should be excluded from the date-time axis scale.
DateTimeScaleOptionsBase.WorkdaysOptions Specifies information about non-working days.
WorkdaysOptions The settings that specify holidays and workdays for the date-time axis scale.
WorkdaysOptions.Workdays Specifies which days of the week are workdays.
WorkdaysOptions.Holidays Specifies holiday dates for excluding them from the date-time scale.
WorkdaysOptions.ExactWorkdays Specifies strict workday dates for including them in the date-time scale.

Note that instead of manually specifying holiday dates, you can import them from the DevExpress Scheduler (.xml) or Microsoft Office Outlook® (.hol) file using the WorkdaysOptions.LoadHolidays method.

Expanded Exclude Non-Working Time

Work Time Rules allow you to specify time intervals which should be displayed on the date-time axis. The following table demonstrates this feature in action.

DateTimeScaleOptionsBase.WorkTimeOnly = false DateTimeScaleOptionsBase.WorkTimeOnly = true

The following markup shows how to configure work time options.

Note

For weekdays whose work time rules are not specified (e.g., Saturday and Sunday in the code above), the whole day (00:00 AM - 12:00 PM) is considered as work time.

The markup above uses the following classes and properties to specify work time.

Class or Property Description
DateTimeScaleOptionsBase.WorkTimeOnly Specifies whether to show only the working time on the date-time axis.
DateTimeScaleOptionsBase.WorkTimeRules Specifies a collection of work time rules which should be applied to the date-time axis scale.
WorkTimeRule Specifies a work time rule.
WorkTimeRule.Weekdays Specifies weekdays on which the specified working time intervals should be applied.
WorkTimeRule.Date Specifies the date on which a rule should be applied.
WorkTimeRule.WorkIntervals Specifies working time intervals within a day.
TimeInterval Specifies a time interval.
TimeInterval.StartHour Specifies the hour part of the time interval's start.
TimeInterval.StartMinute Specifies the minute part of the time interval's start.
TimeInterval.StartSecond Specifies the second part of the time interval's start.
TimeInterval.EndHour Specifies the hour part of the time interval's end.
TimeInterval.EndMinute Specifies the minute part of the time interval's end.
TimeInterval.EndSecond Specifies the second part of the time interval's end.

Expanded See Also

Is this topic helpful?​​​​​​​