|
1 | 1 | --- |
2 | 2 | layout: post |
3 | | -title: Time Line in Blazor Gantt Chart Component | Syncfusion |
4 | | -description: Checkout and learn here all about Time Line in Syncfusion Blazor Gantt Chart component and much more. |
| 3 | +title: Timeline in Blazor Gantt Chart component | Syncfusion |
| 4 | +description: Learn how to configure timelines in the Syncfusion Blazor Gantt Chart component with view modes, zooming, weekend highlighting, and templates. |
5 | 5 | platform: Blazor |
6 | 6 | control: Gantt Chart |
7 | 7 | documentation: ug |
8 | 8 | --- |
9 | 9 |
|
10 | | -# Time Line in Blazor Gantt Chart Component |
| 10 | +# Timeline in Blazor Gantt Chart component |
11 | 11 |
|
12 | | -In the [Blazor Gantt Chart](https://www.syncfusion.com/blazor-components/blazor-gantt-chart) component, timeline is used to represent the project duration as individual cells with defined unit and formats. |
| 12 | +The timeline in the Blazor Gantt Chart component represents project durations as cells with defined units and formats, supporting in-built view modes like Hour-Minute, Day-Hour, Week-Day, Month-Week, Year-Month, and Minutes for flexible visualization. Configure modes using the [TimelineViewMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.TimelineViewMode.html) property, with top and bottom tiers customized via [TopTier.Unit](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTimelineTierSettings.html#Syncfusion_Blazor_Gantt_GanttTimelineTierSettings_Unit) and [BottomTier.Unit](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTimelineTierSettings.html#Syncfusion_Blazor_Gantt_GanttTimelineTierSettings_Unit) in [TimelineSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTimelineSettings.html). This enables detailed views, such as weekly overviews with daily breakdowns for projects, ensuring accurate timeline representation. |
13 | 13 |
|
14 | | -## Timeline view modes |
| 14 | +## Configure timeline view modes |
15 | 15 |
|
16 | | -Gantt Chart contains the following in-built timeline view modes: |
17 | | - |
18 | | -* Hour |
19 | | -* Week |
20 | | -* Month |
21 | | -* Year |
22 | | - |
23 | | -Timescale mode in Gantt Chart can be defined by using [GanttTimelineSettings.TimelineViewMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTimelineSettings.html#Syncfusion_Blazor_Gantt_GanttTimelineSettings_TimelineViewMode) property and also you can define timescale mode of top tier and bottom tier by using `GanttTopTierSettings.Unit` and `GanttBottomTierSettings.Unit` properties. |
24 | | - |
25 | | -Following table explains how top tier and bottom tier unit changes as per `GanttTimelineSettings.TimelineViewMode` property. |
26 | | - |
27 | | -Timeline ViewMode | Top tier Unit | Bottom tier Unit |
28 | | ------|-----|----- |
29 | | -Year | Year | Month |
30 | | -Month | Month | Week |
31 | | -Week | Week | Day |
32 | | -Day | Day | Hour |
33 | | -Hour | Hour | Minute |
| 16 | +Set the timeline view mode using the [TimelineViewMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.TimelineViewMode.html) property, with top tier displaying broader units (e.g., weeks) and bottom tier finer ones (e.g., days), ideal for project schedules. |
34 | 17 |
|
35 | 18 | ### Week timeline mode |
36 | 19 |
|
37 | | -In the `Week` timeline mode, top tier of the schedule header displays the weeks, where as bottom tier of the header displays the days. Refer the following code example. |
| 20 | +In Week mode, the top tier shows weeks and the bottom tier days, suitable for short-term project tracking. |
38 | 21 |
|
39 | 22 | {% tabs %} |
40 | 23 | {% highlight razor tabtitle="Index.razor" %} |
@@ -88,7 +71,7 @@ In the `Week` timeline mode, top tier of the schedule header displays the weeks, |
88 | 71 |
|
89 | 72 | ### Month timeline mode |
90 | 73 |
|
91 | | -In the `Month` timeline mode, top tier of the schedule header displays the months, whereas bottom tier of the schedule header displays its corresponding weeks. Refer the following code example. |
| 74 | +In Month mode, the top tier shows months and the bottom tier show weeks, ideal for medium-term planning. |
92 | 75 |
|
93 | 76 | {% tabs %} |
94 | 77 | {% highlight razor tabtitle="Index.razor" %} |
@@ -140,11 +123,9 @@ In the `Month` timeline mode, top tier of the schedule header displays the month |
140 | 123 |
|
141 | 124 | {% previewsample "https://blazorplayground.syncfusion.com/embed/hNLoXuheJyqkWrNI?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} |
142 | 125 |
|
143 | | - |
144 | | - |
145 | 126 | ### Year timeline mode |
146 | 127 |
|
147 | | -In the `Year` timeline mode, top tier of the schedule header displays the years, where as bottom tier of the schedule header displays its corresponding months. Refer the following code example. |
| 128 | +In Year mode, the top tier shows years and the bottom tier shows months, suitable for long-term projects. |
148 | 129 |
|
149 | 130 | {% tabs %} |
150 | 131 | {% highlight razor tabtitle="Index.razor" %} |
@@ -199,7 +180,7 @@ In the `Year` timeline mode, top tier of the schedule header displays the years, |
199 | 180 |
|
200 | 181 | ### Day timeline mode |
201 | 182 |
|
202 | | -In the `Day` timeline mode, top tier of the schedule header displays the days, where as the bottom tier of the schedule header displays its corresponding hours. Refer the following code example. |
| 183 | +In Day mode, the top tier shows days and the bottom tier hours, ideal for detailed daily scheduling. |
203 | 184 |
|
204 | 185 | {% tabs %} |
205 | 186 | {% highlight razor tabtitle="Index.razor" %} |
@@ -253,7 +234,7 @@ In the `Day` timeline mode, top tier of the schedule header displays the days, w |
253 | 234 |
|
254 | 235 | ### Hour timeline mode |
255 | 236 |
|
256 | | -An `Hour` timeline mode tracks the tasks in minutes scale. In this mode, the top tier of the schedule header displays hour scale and the bottom tier of the header displays its corresponding minutes. |
| 237 | +In Hour mode, the top tier shows hours and the bottom tier minutes, perfect for minute-level task tracking. |
257 | 238 |
|
258 | 239 | {% tabs %} |
259 | 240 | {% highlight razor tabtitle="Index.razor" %} |
@@ -305,9 +286,9 @@ An `Hour` timeline mode tracks the tasks in minutes scale. In this mode, the top |
305 | 286 |
|
306 | 287 | {% previewsample "https://blazorplayground.syncfusion.com/embed/hDLStaBezSOKXmrc?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} |
307 | 288 |
|
308 | | -## Week start day customization |
| 289 | +## Customize week start day |
309 | 290 |
|
310 | | -In the Gantt Chart component, you can customize the week start day using the `GanttTimelineSettings.WeekStartDay` property. By default,the `GanttTimelineSettings.WeekStartDay` is set to 0, which specifies the Sunday as a start day of the week. But, you can customize the week start day by using the following code example. |
| 291 | +In the Gantt chart component, you can customize the week start day using the [GanttTimelineSettings.WeekStartDay](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTimelineSettings.html#Syncfusion_Blazor_Gantt_GanttTimelineSettings_WeekStartDay) property. By default, the `GanttTimelineSettings.WeekStartDay` is set to **0**, which specifies the **Sunday** as a start day of the week. But, you can customize the week start day by using the following code example. |
311 | 292 |
|
312 | 293 | {% tabs %} |
313 | 294 | {% highlight razor tabtitle="Index.razor" %} |
@@ -362,7 +343,7 @@ In the Gantt Chart component, you can customize the week start day using the `Ga |
362 | 343 |
|
363 | 344 | ## Customize automatic timescale update action |
364 | 345 |
|
365 | | -In the Gantt Chart component, the schedule timeline will be automatically updated when the tasks date values are updated beyond the project start date and end date ranges. This can be enabled or disabled using the `GanttTimelineSettings.UpdateTimescaleView` property. |
| 346 | +In the Gantt component, the schedule timeline will be automatically updated when the tasks date values are updated beyond the project start date and end date ranges. This can be enabled or disabled using the [GanttTimelineSettings.UpdateTimescaleView](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTimelineSettings.html#Syncfusion_Blazor_Gantt_GanttTimelineSettings_UpdateTimescaleView) property. |
366 | 347 |
|
367 | 348 | {% tabs %} |
368 | 349 | {% highlight razor tabtitle="Index.razor" %} |
@@ -418,7 +399,7 @@ In the Gantt Chart component, the schedule timeline will be automatically update |
418 | 399 |
|
419 | 400 | ## Timeline cells tooltip |
420 | 401 |
|
421 | | -In the Gantt Chart component, you can enable or disable the mouse hover tooltip of timeline cells using the [GanttTimelineSettings.ShowTooltip](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTimelineSettings.html#Syncfusion_Blazor_Gantt_GanttTimelineSettings_ShowTooltip) property. The default value of this property is true. The following code example shows how to enable the timeline cells tooltip in Gantt Chart. |
| 402 | +In the Gantt Chart component, you can enable or disable the mouse hover tooltip of timeline cells using the [GanttTimelineSettings.ShowTooltip](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTimelineSettings.html#Syncfusion_Blazor_Gantt_GanttTimelineSettings_ShowTooltip) property. The default value of this property is **true**. |
422 | 403 |
|
423 | 404 | {% tabs %} |
424 | 405 | {% highlight razor tabtitle="Index.razor" %} |
@@ -470,9 +451,17 @@ In the Gantt Chart component, you can enable or disable the mouse hover tooltip |
470 | 451 |
|
471 | 452 | {% previewsample "https://blazorplayground.syncfusion.com/embed/VDhotkVoJwAgwcxt?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} |
472 | 453 |
|
473 | | -### Template |
| 454 | +## Timeline Template |
474 | 455 |
|
475 | | -Customizing the timeline cell tooltip in a Gantt Chart using [GanttTooltipSettings.TimelineCellTemplate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTooltipSettings-1.html#Syncfusion_Blazor_Gantt_GanttTooltipSettings_1_TimelineCellTemplate) allows you to display additional information and elements in a more visually appealing and informative way. By combining data bindings and CSS styles, you can create custom templates that suit your specific needs and use cases. The following code example shows how to customize the timeline cell tooltip in Gantt Chart. |
| 456 | +In the Gantt component, you can customize timeline cells using the [GanttTooltipSettings.TimelineCellTemplate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTooltipSettings-1.html#Syncfusion_Blazor_Gantt_GanttTooltipSettings_1_TimelineCellTemplate) property, allowing for the customization of HTML content within timeline cells. This feature enhances the visual appeal and enables personalized functionality. |
| 457 | + |
| 458 | +When designing the timeline cells, you can utilize the following context properties within the template: |
| 459 | + |
| 460 | +* `date`: Defines the date of the timeline cells. |
| 461 | +* `value`: Defines the formatted date value that will be displayed in the timeline cells. |
| 462 | +* `tier`: Defines whether the cell is part of the top or bottom tier. |
| 463 | + |
| 464 | +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. |
476 | 465 |
|
477 | 466 | {% tabs %} |
478 | 467 | {% highlight razor tabtitle="Index.razor" %} |
@@ -564,4 +553,9 @@ Customizing the timeline cell tooltip in a Gantt Chart using [GanttTooltipSettin |
564 | 553 | {% endhighlight %} |
565 | 554 | {% endtabs %} |
566 | 555 |
|
567 | | -{% previewsample "https://blazorplayground.syncfusion.com/embed/BXreXkrIfwyMRUqR?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} |
| 556 | +{% previewsample "https://blazorplayground.syncfusion.com/embed/BXreXkrIfwyMRUqR?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} |
| 557 | + |
| 558 | +## See also |
| 559 | +- [How to configure taskbars?](https://blazor.syncfusion.com/documentation/gantt-chart/taskbar) |
| 560 | +- [How to zoom the timeline?](https://blazor.syncfusion.com/documentation/gantt-chart/zooming) |
| 561 | +- [How to configure non-working days?](https://blazor.syncfusion.com/documentation/gantt-chart/scheduling-tasks#weekend-or-non-working-days) |
0 commit comments