Configuring Timeline Settings in ASP.NET MVC Gantt Chart
In the Gantt control, timeline is used to represent the project duration as individual cells with defined unit and formats.
Timeline view modes
Gantt contains the following in-built timeline view modes:
- Hour
- Week
- Month
- Year
Timescale mode in Gantt can be defined by using TimelineViewMode property and also we can define timescale mode of top tier and bottom tier by using TopTier.Unit and BottomTier.Unit properties.
Week timeline mode
In the Week timeline mode, the upper part of the schedule header displays the weeks, whereas the bottom half of the header displays the days. Refer to the following code example.

Month timeline mode
In the Month timeline mode, the upper part of the schedule header displays the months, whereas the bottom header of the schedule displays its corresponding weeks. Refer to the following code example.

Year timeline mode
In the Year timeline mode, the upper schedule header displays the years whereas, the bottom header displays its corresponding months. Refer to the following code example.

Day timeline mode
In the Day timeline mode, the upper part of the header displays the days whereas, the bottom schedule header displays its corresponding hours. Refer to the following code example.

Hour timeline mode
An Hour timeline mode tracks the tasks in minutes scale. In this mode, the upper schedule header displays hour scale and the lower schedule header displays its corresponding minutes.

Timeline view dates
The Gantt Chart control supports rendering a fixed timeline range using the viewStartDate and viewEndDate properties. These properties allow the visible portion of the timeline to be explicitly defined and locked within the Gantt chart UI, independent of the project’s overall scheduling boundaries defined by projectStartDate and projectEndDate. The projectStartDate and projectEndDate values represent the full scheduling window for the project and are used for baseline processing, critical-path calculations, and project-level reporting. By default, both viewStartDate and viewEndDate are set to auto. The following example demonstrates how to configure a custom timeline view range.
Key behaviors
When viewStartDate and viewEndDate are set to concrete Date values, the timeline rendering is restricted to the inclusive range [viewStartDate, viewEndDate].
- When
viewStartDateis set to auto:- If
projectStartDateis defined, the timeline begins atprojectStartDate. - If
projectStartDateis not defined, the earliest task start date is used as the beginning of the visible range.
- If
- When
viewEndDateis set to auto:- If
projectEndDateis defined, the timeline ends atprojectEndDate. - If
projectEndDateis not defined, the maximum task end date is used. If this end date leaves visible white‑space in the timeline area, the end date is automatically extended to fill the chart width.
- If
Note: The
ZoomToFitfeature usesprojectStartDateandprojectEndDateto fit the entire project within the available timeline viewport.
Timeline cells tooltip
In the Gantt control, you can enable or disable the mouse hover tooltip of timeline cells using the TimelineSettings.ShowTooltip property. The default value of this property is true. The following code example shows how to enable the timeline cells tooltip in Gantt.

Show/hide weekends
The timelineSettings.showWeekend property is used to customize the timeline in the Gantt component by controlling the visibility of weekends. To exclude weekends from the timeline, set the showWeekend property to false in the timelineSettings configuration. This feature is particularly useful for focusing the timeline on working days, enhancing project management efficiency by hiding weekends from the view.
Note: To customize non-working or weekend days in the Gantt chart, refer to the workWeek documentation for detailed information.
Limitations
- The
showWeekendfeature does not support baselines.- The
showWeekendis not compatible with the manual task mode.- Non-working hours cannot be excluded when
showWeekendis set to false.- Holidays are not excluded from the timeline if
showWeekendis set to false.
Timeline template
In the Gantt component, you can customize timeline cells using the timelineTemplate property, allowing for the customization of HTML content within timeline cells. This feature enhances the visual appeal and enables personalized functionality.
When designing the timeline cells, you can utilize the following context properties within the template:
-
date: Defines the date of the timeline cells. -
value: Defines the formatted date value that will be displayed in the timeline cells. -
tier: Defines whether the cell is part of the top or bottom tier.
The following code example how to customize the top tier to display the week’s weather details and the bottom tier to highlight working and non-working days, with formatted text for holidays.
Infinite timeline scrolling
The enableInfiniteTimelineScroll property enables infinite horizontal scrolling in the Gantt Chart timeline by dynamically extending the visible timeline range as the user navigates. Set enableInfiniteTimelineScroll to true to enable this behavior.
Key behaviors
- When
enableInfiniteTimelineScrollis enabled, the timeline automatically extends in the forward direction as the user scrolls using the horizontal scrollbar or clicks the forward scroll arrow. - In the backward direction, the timeline extends only when the user clicks the backward scroll arrow. Scrolling or dragging the scrollbar backward does not trigger timeline extension.
- Infinite scrolling extends only the visible timeline range and does not modify the project dates.
This feature enables exploration of long project schedules without manually updating the timeline range.
