# Gantt Charts

## Content



A **Gantt** chart is used to illustrate a timeline of various tasks and outline the critical activities to the project's completion.

The **Gantt** chart has the following similarities to the **Bar** and the **HiLo** charts:

*   Like the Bar chart, the **Gantt** chart uses bars, but it is commonly displayed as an inverted and reversed bar chart.
*   Similar to the **HiLo** chart, where the elements of the [Y](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y.html) and [Y1](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y1.html) arrays in each series represent the "high" value and the "low" value, the **Gantt** chart uses the [Y](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y.html) and [Y1](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y1.html) elements to represent the start and finish time of a task.

A **Gantt** chart clearly illustrates a timeline in the following ways:

*   **Activities/Tasks**
    
    The activities/tasks are displayed along the left side of the chart and a timeline is shown at the top or bottom of the chart.
    
*   **Task Duration**
    
    The duration of each project's task is represented as a bar. The beginning of the bar indicates the start time of the activity or task. The end of the bar indicates the finish or completion time of the activity or task.
    
*   **Critical Activities or Accomplishments**
    
    Typically, in **Gantt** charts, special characters or colors are used to represent critical activities or accomplishments through the duration of each task.
    

In a **Gantt** chart you can create a new task by adding a new series to the [ChartDataSeries](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.html). In each series there are several properties that you will use to create the information for your data in the task. For instance, you can use the [Y](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y.html) property to fill in the data for the start time of your task and the [Y1](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Y1.html) property to record the data for the end time of your task. You can choose the type of data that you want to use for your **Gantt** chart from the [DataType](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataArray.DataType.html) property of the [ChartDataArray](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataArray.html).

The **Gantt** chart below shows the start and finish time of each task. Gantt charts can display single or multiple projects in one task. In some cases, a task is assigned multiple subtasks. Each bar represents one task or subtask. Having a few bars in one axis can span a large range of x and y values. The data for a Gantt chart is more effective when it is displayed horizontally rather than vertically. As a result, the chart is inverted when the x-axis is vertical and the y axes are horizontal. C1Chart provides the [Inverted](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.Area.Inverted.html) property of the ChartArea and the [Reversed](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.Axis.Reversed.html) property of the Axis. Notice that each horizontal bar is filled in with a solid color. Often, this represents a completed task. Also, each horizontal bar contains a label indicating the start date and finish date. The labels can be added to the horizontal bars at run time or at design time by using the [Label](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.Label.html) property of the [ChartDataSeries](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.html) class.

![](https://cdn.mescius.io/document-site-files/images/70bd33a2-280e-4cc3-a1c0-7b827eceb8aa/imagesext/image9_57.png)

### To set the chart type to Gantt at design time

*   Expand the ChartGroups node in the Properties window. Open the **ChartGroups Collection Editor** by clicking the **ellipsis** button. In the right pane of the editor, set the [ChartType](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartGroup.ChartType.html) property to **Gantt**.
*   An alternate method to change chart type is to right-click the existing chart and select **Chart Properties**. From the Gallery, select [ChartType](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartGroup.ChartType.html) as **Gantt**.
*   Another alternate method is to select **Chart Properties** from the Properties pane. From the Gallery, select [ChartType](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartGroup.ChartType.html) as **Gantt**.

## See Also

[Gantt Chart Programming Considerations](/componentone/docs/win/online-chart2d/specific2dcharts/ganttcharts/ganttchartprogrammin)