Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Providing Data
    [Expand]Providing Data
    [Collapse]Data Representation
      Filtering Data
      Sorting Data
      Calculating Summaries
      Using The Top-N Feature
      Work Time and Workday Configuration
      Empty Points Representation
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Additional Resources
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

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

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

Axis.DateTimeScaleOptions.WorkdaysOnly = false Axis.DateTimeScaleOptions.WorkdaysOnly = true

The following code demonstrates how to configure workdays options.

The below members and classes are used in the code above.

Class or Member Description
DateTimeScaleOptions.WorkdaysOnly Specifies whether holidays and non-working days should be excluded from the axis scale.
DateTimeScaleOptions.WorkdaysOptions Specifies information about non-working days.
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 to the date-time scale.
KnownDate A particular named date.

Note that holidays can be imported from the DevExpress Scheduler (.xml) or Microsoft Office Outlook® (.hol) file, using the Load Holidays button, at design time, or using the WorkdaysOptions.LoadHolidays method at runtime.

Expanded Exclude Non-Working Time

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

Axis.DateTimeScaleOptions.WorkTimeOnly = false Axis.DateTimeScaleOptions.WorkTimeOnly = true

The following code demonstrates how to configure work time rules.

Note

Note that 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 taken as work time.

To exclude whole days, use Workdays properties.

The code below uses the following classes and methods.

Class or Member Description
DateTimeScaleOptions.WorkTimeOnly Specifies the value indicating whether to show only the working time on a date-time axis.
DateTimeScaleOptions.WorkTimeRules Specifies a collection of work time rules which should be applied to the date-time axis scale.
WorkTimeRule A work time rule.
WorkTimeRule.WorkIntervals Specifies working intervals within a day.
TimeInterval A time interval.
WorkTimeRule.Weekdays Specifies weekdays on which the rule should be applied.
WorkTimeRule.Date Specifies the date on which the rule should be applied.

Expanded See Also

How would you rate this topic?​​​​​​​