CLASS GanttPlotObject
(Defined in: jpgraph_gantt.php : 2933)
 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

ArgumentDefaultDescription
$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

ArgumentDefaultDescription
$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

The possible arrow sizes are

Type of arrow can be either of

 

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

ArgumentDefaultDescription
$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

ArgumentDefaultDescription
$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.

ArgumentDefaultDescription
$aOff  Offset in pixels

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

Example

$ms->SetLabelLeftMargin(20);