Contents Previous Next

## 9.7 Gantt bars

The most common of all object in a Gantt chart is of course the activity bar (GanttBar()). In terms of formatting this object has a very large flexibility. The full signature for the GanttBar constructor is

`function GanttBar( $aVPos,$aTitle,$aStart ,$aEnd,$aCaption, $aHeight)`

`$aVPos` |  | The vertical position for the bar, [0..n]
`$aTitle` |  | Title for the activity
`$aStart` |  | Start date for the activity given as string, e.g "2001-09-22"
`$aEnd` |  | End date for activity given as either a date (a string) or as the duration (in days) of the activity, e.g both "2001-10-15" and 20.5 are valid inputs
`$aCaption` |  | Text string (caption) to appear at the end (right side) of the bar
`$aHeight` |  | Height of bar given as either a value in range [0,1] in which case this is interpretated as what fraction of the vertical position should the bar occupy. The height can also be given in absolute pixels [1..200]

Contents Previous Next