Class GanttActivityInfo
(Defined in: jpgraph_gantt.php : 142)
 
 GanttActivityInfo 
 Hide() 
 SetBackgroundColor() 
 SetColor() 
 SetColTitles() 
 SetColumnMargin() 
 SetFont() 
 SetFontColor() 
 SetHeaderAlign() 
 SetStyle() 
 Show() 
 

Class usage and Overview
This class is responsible for handling the titles of the columns in the left section of the Gantt graph, i.e. the information columns for each activity.

It is instantiated in the scale and is accessed through the Gantt scale for example as in

$graph->scale->actinfo->SetColTitles( array('Note','Name','Duration','Start','Finish'),array(30,100)); $graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); $graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); $graph->scale->actinfo->vgrid->SetStyle('solid'); $graph->scale->actinfo->vgrid->SetColor('gray');

It is optional to use titles for the columns, so if you don't want to use titles you never have to add the above lines to a Gantt graph (but it sure looks nicer if you do ... )

 


Class Methods

 

GanttActivityInfo ::
Hide($aF)
Hide titles

ArgumentDefaultDescription
$aF true TRUE=Hide titles

Description:
Hide titles 

Example:

// Hide the titles
$graph->scale->actinfo->Hide();

 

GanttActivityInfo ::
SetBackgroundColor($aColor)
Specify backgound color for titles

ArgumentDefaultDescription
$aColor  Color specification

Description:
Specify backgound color for titles 

Example:

$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5');

 

GanttActivityInfo ::
SetColor($aColor)
Specify color of vertical dividers between each title column

ArgumentDefaultDescription
$aColor  Color specification

Description:
Specify color of vertical dividers between each title column 

Example:

$graph->scale->actinfo->SetColor('navy');

 

GanttActivityInfo ::
SetColTitles($aTitles, $aWidth)
Specify texts to be used as titles

ArgumentDefaultDescription
$aTitles  Array of titles
$aWidth null Optional width for each column

Description:
Specify texts to be used as titles. The columns automatically becoms wide enough to hold the widest text in any columns. However you can also specify a specific width of each column by supplying an array of widths. However, the width can never be made smaller than the width of the texts, just larger.

It is perfectly legal to just specify the explicit width of the first few columns and have the rest of them become automatically sized. See eamplebelow.  

Example:

// Specify some titles and explicitely set the size of the
// first two columns.
$graph->scale->actinfo->SetColTitles(
    array(
'Note','Name','Duration','Start','Finish'),array(30,100));

 

GanttActivityInfo ::
SetColumnMargin($aLeft, $aRight)
Specify extra margin to the left and right of the text in each column

ArgumentDefaultDescription
$aLeft  Left margin (in pixels)
$aRight  Right margin (in pixels)

Description:
Specify extra margin to the left and right of the text in each column 

Example:

$graph->scale->actinfo->SetColumnMargin(30,30);

 

GanttActivityInfo ::
SetFont($aFFamily, $aFStyle, $aFSize)
Specify title font

ArgumentDefaultDescription
$aFFamily  Font family
$aFStyle FS_NORMAL Font style
$aFSize 10 Font size

Description:
Specify title font 

Example:

$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10);

 

GanttActivityInfo ::
SetFontColor($aFontColor)
Specify title font color

ArgumentDefaultDescription
$aFontColor  Color specification

Description:
Specify title font color 

Example:

$graph->scale->actinfo->SetFontColor('navy');

 

GanttActivityInfo ::
SetHeaderAlign($aAlign)
Adjust headers left, right or centered

ArgumentDefaultDescription
$aAlign  Header alignment

Description:
Adjust headers left, right or centered. By default headers are centered. 

Example:

$graph->scale->actinfo->SetHeaderAlign('left');

 

GanttActivityInfo ::
SetStyle($aStyle)
Enable 3D header style

ArgumentDefaultDescription
$aStyle  1=3D style

Description:
Enable 3D header style. This is enabled by default. 

Example:

// No 3D style for titles
$graph->scale->actinfo->SetStyle(0);

 

GanttActivityInfo ::
Show($aF)
Show titles

ArgumentDefaultDescription
$aF true TRUE=Show headers

Description:
Show titles. If you specify titles they are by default displayed. 
 
See also:

Example:

// Hide the titles
$graph->scale->actinfo->Show(false);