(Defined in: jpgraph_gantt.php : 3140) Class usage and Overview
This class represents each activity bar. The activity bars can then be added to a GanttChart vi the GanttGraph::Add()
Class Methods
function GanttBar($aPos,$aLabel,$aStart,$aEnd,$aCaption,$aHeightFactor)
Create a new activity bar.
Argument | Default | Description |
$aPos
| | Vertical position (row) |
$aLabel
| | Text label |
$aStart
| | Start date |
$aEnd
| | End date |
$aCaption
|
""
| Caption string for bar |
$aHeightFactor
|
0.6
| Height factor |
Description
Create a new activity bar. An activity bar is created by specifyin :
- The row in gentt chart to draw the activity bar in
- Specify a label(titel) for the activity.
- A start date
- An end date
- A caption which is a string that gets stroked to the right of the activity bar.
- Height as either an asbolute value or as a fraction of the available row height.
$bar = new GanttBar(4,"Group 2", "2001-11-30","2001-12-22","[5%]",10);
function SetColor($aColor)
Specify frame color for the activity bar
Argument | Default | Description |
$aColor
| | Color for gantt bar |
Description
Specify frame color for the activity bar.
$bar->SetColor('orange');
function SetFillColor($aColor)
Specify fill color for activity bar.
Argument | Default | Description |
$aColor
| | Fill color |
Description
Specify fill color for activity bar.
Note: It is perfectly possible to use both a background color as weel as a pattern.
$bar->SetPattern(BAND_RDIAG,"yellow");
$bar->SetFillColor("red");
function SetHeight($aHeight)
Set height for the bar.
Argument | Default | Description |
$aHeight
| | Height specification for bars |
Description
Specify height of the activity bar. The height can be specified as either as fraction (0.0 to 1.0) or as an absolute value (1 to 200). In the first case the height is interpreted as the fraction of the row height and in the second case as an absolute height in pixels.
$bar->SetHeight(0.6);
function SetPattern($aPattern,$aColor,$aDensity)
Specify what pattern to use for the activity bars.
Argument | Default | Description |
$aPattern
| | Pattern specification |
$aColor
|
"blue"
| Pattern color |
$aDensity
|
95
| Density |
Description
The following patterns are currently implemented:
- GANTT_RDIAG, Right diagonal lines
- GANTT_LDIAG, Left diagonal lines
- GANTT_SOLID, Solid one color
- GANTT_LVERT, Vertical lines
- GANTT_LHOR, Horizontal lines
- GANTT_VLINE, Vertical lines
- GANTT_HLINE, Horizontal lines
- GANTT_3DPLANE, A 3D plane
- GANTT_HVCROSS, Crosses
- GANTT_DIAGCROSS, Diagonal crosses
See also
Progress::SetPattern
$bar->SetPattern(BAND_RDIAG,"yellow");
$bar->SetFillColor("red");
function SetShadow($aShadow,$aColor)
Add a drop shadow to the bar.
Argument | Default | Description |
$aShadow
|
true
| True=Add drop shadow to bars |
$aColor
|
"gray"
| Colro fo shadow |
Description
Add a drop shadow to the bar.
$bar->SetShadow();