Different tasks types for Gantt Charts

Overview

There are following types of tasks in Project Gantt Chart: Normal, Summary and Milestone. You dont have to set the type explicitly - it is defined upon certain criteria described below.

The main thing you should remember about any Task - avoid id duplication. It wouldn't raise error, but chart would not be correct.

Tasks types

Normal. This is a task that has start time, end time, and doesn't include any other tasks (isn't a parent of any other task).

Parent. This is a task that has both start and end time and also has some tasks inside it (is a "parent" of some tasks)

Milestone. It is some sort or waypoint that indicates some major event. It has start time only.

Please take a look at the sample XML of project of five tasks of different types:

<project_chart>
  
<tasks>
    
<task id="1" name="Parent 1" actual_start="2008.07.10" actual_end="2008.07.15" />
    
<task id="2" name="Parent 1" parent="1" actual_start="2008.07.10" actual_end="2008.07.13" />
    
<task id="3" name="Normal 1" parent="2" actual_start="2008.07.11" actual_end="2008.07.12" />
    
<task id="4" name="Normal 2" actual_start="2008.07.08" actual_end="2008.07.15" />
    
<task id="5" name="Milestone" actual_start="2008.07.15" />
  
</tasks>
</project_chart>

Sample of all types of tasks:

Tasks types sample - Click to see Live Chart Preview
Tasks types sample - Click to see Live Chart Preview

The first two tasks are parent tasks, the third and forth - normal, and the fifth one is a milestone. On the datagrid you may see markers near first two tasks. They show that they are parent tasks. "Task 1" is a parent of "Task 2" and "Task 2", in its turn, is a parent of "Tasks 3".

Normal Tasks

Normal tasks have start time, end time, and doen't include any other tasks (aren't parent of any other task). Normal tasks can have actual state bar, planned (baseline) bar and progress bar.

Actual start time and end time is set using actual_start and actual_end attributes of <task> node, for example:
<task actual_start="2008.07.01" actual_end="2008.07.12"/>
.

Planned task state is optional, it set using baseline_start and baseline_end attribute in <task> node, for example:
<task baseline_start="2008.07.01" baseline_end="2008.07.12"/>.

Task progress is optional, but it is used in the most of the cases and set using progress attribute of <task> node, for example: <task progress="72"/>.

Here is the sample of task with all these attributes set:

<task id="2" name="Troops Assembly" actual_start="2008.07.17" actual_end="2008.07.20" baseline_start="2008.07.15" baseline_end="2008.07.18" progress="50" />

And this is the live sample of the project with several Normal Tasks and all attributes set:

Tasks types normal sample - Click to see Live Chart Preview
Tasks types normal sample - Click to see Live Chart Preview

You can define how tasks looks like using Task Style, which can be individual for each task or common for all Normal tasks in the project. Please refer to these tutorials to learn more:

to top

Summary Tasks

This are tasks that have both start and end time and also has some tasks inside it (they a "parent" of some tasks), in all terms they are usual tasks, but they are used to group another tasks.

When task is summary it looks different (by default - you can change it) and expand/collapse icon appears against it in the datagrid.

Here is the sample of task with all these attributes set and one subtask:

<tasks>
  
<task id="0" name="Martian Campaign" actual_start="2008.07.10" actual_end="2008.07.23" baseline_start="2008.07.10" baseline_end="2008.07.23" progress="100" expanded="false" />
  
<task id="1" parent="0" name="Campaign Planning" actual_start="2008.07.10" actual_end="2008.07.15" progress="100" />
</tasks>

Expand/Collapse Control

You can control if the summary task is expanded or collapsed by default, using expanded attribute of task node.

And this is the live sample of the project with several two Summary Tasks, one is expanded and one is collapsed:

Tasks types summary sample - Click to see Live Chart Preview
Tasks types summary sample - Click to see Live Chart Preview

Summary attributes automatic calculation

You can control set summary task start, end and progress manually or make AnyGantt calculate it automatically. To enable automatic calculation you need to set enabled attribute in <auto_summary> node to "True". real_time_update and progress_update attributes define whether start, end and progress attributes are updated in real time when child tasks are changed in real time.

<anygantt>
  
<project_chart>
    
<auto_summary enabled="True" real_time_update="True" progress_update="True" />
  
</project_chart>
</anygantt>

And this is the live sample of the project with several two Summary Tasks, which are calculated automatically:

Tasks types summary auto sample - Click to see Live Chart Preview
Tasks types summary auto sample - Click to see Live Chart Preview

You can define how tasks looks like using Task Style, which can be individual for each task or common for all Summary tasks in the project. Please refer to these tutorials to learn more:

to top

Milestones

Milestones aresome sort or waypoints, that indicate some major or important event in the project. They have start time only - and this makes them milestones for AnyGantt. Marker type and color is configured as a part of Task Style.

Sample XML for a Milestone:

<task id="3" parent="0" name="Guard Assembly" actual_start="2008.07.18" />

Sample Project with two milestones defined:

Tasks types milestone sample - Click to see Live Chart Preview
Tasks types milestone sample - Click to see Live Chart Preview

You can define how milestones look like using Task Style, which can be individual for each milestont or common for all milestones in the project. Please refer to these tutorials to learn more:

to top

to top