Contents Previous Next

## 9.4 The structure of a Gantt chart

A Gantt chart is made up of four distinct areas.

1. On the left side there is the activity title column.
2. On the top there is the scale headers (up to four headers may be displayed)
3. The actual plot area where all the Gantt bars and markers go
4. The margin area, where for example the titles are shown

Since a Gantt chart inherits all the usual properties of a JpGraph Graph() you have the access to the same method to formatting the image as before. For example to have a shadow around the image you call Graph::SetShadow() and to set the margin color you can use Graph::SetMarginColor(). Please refer to the reference documentation for a full list of supported features.

To create a Gantt chart you add objects to it. As of this writing you may add the following object by the use of the GanttChart::Add() method

- Gantt bars (indicates the length of an activity)
- Milestones, a single mark at a specific date
- Vertical line, might be use to mark phases in projects

All these objects may be extensively modified in terms of formatting. You can specify color (both fill- and frame color), size, titles, style and patterns and so on. All these objects comes with (in my mind) sensible default so you don't have to specify a lot of parameters. But if you need a fine grain control or if you disagree with my taste you can.

Contents Previous Next