Class GanttBar Extends GanttPlotObject
(Defined in: jpgraph_gantt.php : 3192)

GanttBar | GanttPlotObject
SetBreakStyle() SetColor() SetFillColor() SetHeight() SetPattern() SetShadow() __construct() | SetCaptionMargin() SetConstrain() SetCSIMAlt() SetCSIMTarget() SetLabelLeftMargin()

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

GanttBar ::
SetBreakStyle($aFlg, $aLineStyle, $aLineWeight)

Argument | Default | Description
--- | --- | ---
$aFlg | true | No description available
$aLineStyle | 'dotted' | No description available
$aLineWeight | 1 | No description available

Description:
No description available.

GanttBar ::
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.

Example:

$bar->SetColor('orange');

GanttBar ::
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.

Example:

$bar->SetPattern(BAND_RDIAG,"yellow");
$bar->SetFillColor("red");

GanttBar ::
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.

Example:

$bar->SetHeight(0.6);

GanttBar ::
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:

1. GANTT_RDIAG, Right diagonal lines
2. GANTT_LDIAG, Left diagonal lines
3. GANTT_SOLID, Solid one color
4. GANTT_LVERT, Vertical lines
5. GANTT_LHOR, Horizontal lines
6. GANTT_VLINE, Vertical lines
7. GANTT_HLINE, Horizontal lines
8. GANTT_3DPLANE, A 3D plane
9. GANTT_HVCROSS, Crosses
10. GANTT_DIAGCROSS, Diagonal crosses

See also:

- Progress::SetPattern()

Example:

$bar->SetPattern(BAND_RDIAG,"yellow");
$bar->SetFillColor("red");

GanttBar ::
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.

Example:

$bar->SetShadow();

GanttBar ::
__construct($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 :

1. The row in gentt chart to draw the activity bar in
2. Specify a label(titel) for the activity.
3. A start date
4. An end date
5. A caption which is a string that gets stroked to the right of the activity bar.
6. Height as either an asbolute value or as a fraction of the available row height.

Example:

$bar = new GanttBar(4,"Group 2", "2001-11-30","2001-12-22","[5%]",10);