Gantt
Namespace: Wisej.Web.Ext.Syncfusion2
Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)
The Gantt chart is a project management control used to display and manage the tasks of a project, with their hierarchy, duration, progress and dependencies, on a timeline.
- C#
- VB.NET
public class Gantt : ej2Base
Public Class Gantt
Inherits ej2Base
Constructors
Gantt()
Constructs a new instance of the Gantt class.
Example:
The following example creates a Gantt chart and binds it to a list of tasks through the Options object.
var gantt = new Gantt();
gantt.Options.taskFields = new { id = "id", name = "name", startDate = "start", duration = "duration", progress = "progress" };
gantt.Options.dataSource = new[]
{
new { id = 1, name = "Analysis", start = new DateTime(2024, 4, 1), duration = 5, progress = 100 },
new { id = 2, name = "Development", start = new DateTime(2024, 4, 8), duration = 10, progress = 40 }
};
gantt.Dock = DockStyle.Fill;
this.Controls.Add(gantt);
Gantt(options)
Constructs a new instance of the Gantt class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a Gantt chart with two tasks linked by a finish-to-start dependency.
var gantt = new Gantt(new
{
highlightWeekends = true,
taskFields = new
{
id = "id",
name = "name",
startDate = "start",
duration = "duration",
progress = "progress",
dependency = "predecessor"
},
dataSource = new[]
{
new { id = 1, name = "Design", start = new DateTime(2024, 4, 1), duration = 4, progress = 80, predecessor = "" },
new { id = 2, name = "Build", start = new DateTime(2024, 4, 5), duration = 8, progress = 20, predecessor = "1FS" }
}
});
gantt.Dock = DockStyle.Fill;
this.Controls.Add(gantt);