CLASS GanttPlotObject (Defined in: jpgraph_gantt.php : 2820)

GanttPlotObject
SetCaptionMargin() SetConstrain() SetCSIMAlt() SetCSIMTarget() SetLabelLeftMargin()

Class usage and Overview
Abstract base class to hold common properties for all objects that are drawn on the Gantt plot like activity bars, milestones, vertical markers.

Internal method that can't be instantiated directly. Used to capture the common properties of all objects that can be added to the Ganttgraph, i.e. GanttBar, MileStones GanttVLine.

See also related classes:
GanttGraph, GanttBar, GanttVLine and MileStone

Class Methods

function SetCaptionMargin($aMarg)
Specify margin (in pixels) between object and caption string

Argument | Default | Description
--- | --- | ---
$aMarg |  | Margin in pixels

Description
Specify margin (in pixels) between object and caption string

Example

$ms->SetCaptionMargin(20);

function SetConstrain($aRow,$aType,$aColor,$aArrowSize,$aArrowType)
Specify a constrain link between this object and another

Argument | Default | Description
--- | --- | ---
$aRow |  | Gantt row where tarhet for constrain is
$aType |  | Type of constrain
$aColor | 'black' | Color of constrain
$aArrowSize | ARROW_S2 | Size of ending arrow
$aArrowType | ARROWT_SOLID | Type of arrow

Description
Specify a constrain link between this object and another. The possible constrain types are

- CONSTRAIN_STARTSTART
- CONSTRAIN_STARTEND
- CONSTRAIN_ENDSTART
- CONSTRAIN_ENDEND

The possible arrow sizes are

- ARROW_S1, smallest
- ARROW_S2, (default)
- ARROW_S3
- ARROW_S4
- ARROW_S5, largest

Type of arrow can be either of

- ARROWT_SOLID
- ARROWT_OPEN

Example

// Add a constrain from the end of this activity to
// the start of the activity on row 2
$bar->SetConstrain(2,CONSTRAIN_ENDSTART);

function SetCSIMAlt($aAlt)
Specify ALT-tag text for hotspot

Argument | Default | Description
--- | --- | ---
$aAlt |  | Alt text

Description
The ALT text used in conjunction with image map is handled slightly diffrent between different browsers. Most browser show this text if you let the mouse pointer hoover over a hotspot in the image for 1 or 2 seconds.

Note: You must have specified a CSIM atrget for this to have any effect.

See also
GanttPlotObject::SetCSIMTarget

Example

$bar->SetCSIMAlt('Main activity');

function SetCSIMTarget($aTarget,$aAlt)
Specify URL when object is used in a CSIM

Argument | Default | Description
--- | --- | ---
$aTarget |  | Target URL
$aAlt | '' | Alt texts

Description
Used to specify the target URL for for a hotspot
See also
GanttPlotObject::SetCSIMAlt

Example

$bar->SetCSIMTarget('http://localhost/show_details.php');

function SetLabelLeftMargin($aOff)
Specify offset (in pixels) for the title of this object.

Argument | Default | Description
--- | --- | ---
$aOff |  | Offset in pixels

Description
Specify offset (in pixels) for the title of this object

Example

$ms->SetLabelLeftMargin(20);