[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  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]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Gantt Control
    Overview
    Data Source
    Tree and Chart Areas
    Tasks, Milestones, Dependencies
    Timescale
    Workweek Schedule and Exceptions
    View Options and Appearances
    Ribbon Commands
    Localization
  [Expand]Chart Control
  [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]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[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)

Timescale

Expanded Project Bounds

The chart area displays a timescale. The GanttControl.ChartStartDate and GanttControl.ChartFinishDate properties specify the start and finish dates on the timescale.

Expanded Zoom

The timescale ruler can be in hours, days, weeks, etc. Users can hold Ctrl and use the mouse wheel to change the measure unit.

The GanttControl.ZoomMode property specifies how the scale changes:

  • first decreases the size of a single division to a certain limit and then switches to the next measure unit (week, month, quarter, etc.).
  • switches to the next measure unit by each wheel step.

You can call the GanttControl.ZoomIn and GanttControl.ZoomOut methods to change the measure unit in code.

Expanded Rulers

The timescale can show from one to three rulers. Rulers display different measure units depending on the zoom factor: years-quarters-months, months-days-hours, etc.

The GanttControl.TimescaleRulerCount property specifies the number of rulers in the timescale.

The GanttControl.RequestTimescaleRulers event allows you to customize the timescale rulers.

The code below shows how to change the date-time format depending on the time scale ruler's measure unit.

Expanded Measure Units

The GanttControl.OptionsMainTimeRuler provides access to the bottom timescale ruler's options.

The GanttControlOptionsMainTimeRuler.Unit property specifies the time interval that corresponds to a single measure unit on the time scale. For example, the time scale can be in hours, days, or months.

The time scale displays division marks. The GanttControlOptionsMainTimeRuler.Count property specifies the number of measure units in a single division. For example, if the measure unit is an hour, a single division can correspond to one, two, or six hours.

The GanttControlOptionsMainTimeRuler.MinUnit and GanttControlOptionsMainTimeRuler.MaxUnit properties specify the minimum and maximum measure unit.

Expanded Draw a Timescale Column Manually

The GanttControl.CustomDrawTimescaleColumn event fires before a column in the timescale ruler is displayed. This event allows you to draw the column manually.

The code below shows how to display a deadline in the chart.

The code below shows how to draw striplines.

Note

Run the Gantt Code Examples demo to see the complete example.

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