Class HeaderProperty
(Defined in: jpgraph_gantt.php : 1781)
 
 HeaderProperty 
 SetBackgroundColor() 
 SetFont() 
 SetFontColor() 
 SetFormatString() 
 SetFrameColor() 
 SetFrameWeight() 
 SetInterval() 
 SetIntervall() 
 SetLabelFormatString() 
 SetStyle() 
 SetSundayFontColor() 
 SetTitleVertMargin() 
 SetWeekendColor() 
 

Class usage and Overview
Data encapsulating class to hold properties for each type of the scale headers of the Gantt chart. It is instantiated in (and accessible through) $ganttgraph->scale->min $ganttgraph->scale->hour $ganttgraph->scale->day $ganttgraph->scale->week $ganttgraph->scale->month $ganttgraph->scale->year You use the methods on these object to specify how you want the scale to be displayed. For example specifying if the week view will show start date or week number.

 


Class Methods

 

HeaderProperty ::
SetBackgroundColor($aColor)
Specify background color in scale

ArgumentDefaultDescription
$aColor  Color

Description:
Specify background color in scale 

Example:

$ganttgraph->scale->week->SetBackgroundColor('lightblue');

 

HeaderProperty ::
SetFont($aFFamily, $aFStyle, $aFSize)
Specify font for scale

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

Description:
Specify font for scale 

Example:

$ganttgraph->scale->week->SetFont(FF_FONT0);

 

HeaderProperty ::
SetFontColor($aColor)
Specify font (text) color

ArgumentDefaultDescription
$aColor  Color

Description:
Specify font (text) color 

Example:

$ganttgraph->scale->week->SetFontColor('darkred');

 

HeaderProperty ::
SetFormatString($aStr)
Specify format string for scales

ArgumentDefaultDescription
$aStr  Format string

Description:
Specify printf() style format string for scales 

 

HeaderProperty ::
SetFrameColor($aColor)
Set color of frame around scale

ArgumentDefaultDescription
$aColor  Color

Description:
Set color of frame around scale 

Example:

$ganttgraph->scale->year->SetFrameCOlor('darkblue');

 

HeaderProperty ::
SetFrameWeight($aWeight)
Specify width of frame around scale

ArgumentDefaultDescription
$aWeight  Width in pixels

Description:
Specify width of frame around scale 

Example:

$ganttgraph->scale->year->SetFrameWeight(2);

 

HeaderProperty ::
SetInterval($aInt)

ArgumentDefaultDescription
$aInt  No description available

Description:
No description available.

 

HeaderProperty ::
SetIntervall($aInt)
Set scale interval

ArgumentDefaultDescription
$aInt  Integer intervall

Description:
Set scale interval. The exact behaviour depends on if this is evoked on a day, hour or minute scale.

For example if the scale is an hour scale then SetIntervall() will give number of hours between each scale interball. 

Example:

// Setup minute format
$graph->scale->minute->SetIntervall(30);
$graph->scale->minute->SetBackgroundColor('lightyellow:1.5');
$graph->scale->minute->SetFont(FF_FONT0);
$graph->scale->minute->SetStyle(MINUTESTYLE_MM);
$graph->scale->minute->grid->SetColor('lightgray');

 

HeaderProperty ::
SetLabelFormatString($aStr)
Specify format string for use in scale

ArgumentDefaultDescription
$aStr  printf() style format string

Description:
Specify format string for use in scale. 

Example:

$ganttgraph->scale->week->SetLabelFormatString('week %d');

 

HeaderProperty ::
SetStyle($aStyle)
Specify style of scale.

ArgumentDefaultDescription
$aStyle  Scale style

Description:
Specifies how the week, month, day, hour and minute scale should appear. For year scale this method has no meaning. For week scale: For month scale: For Day style For hour style Minute style  

Example:

$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);

 

HeaderProperty ::
SetSundayFontColor($aColor)
Only used by day scale. Specify font color for sunday.

ArgumentDefaultDescription
$aColor  Color

Description:
Only used by day scale. Specify font color for sunday. The default is toi display Sundays in red color as per convention. 
 
See also:

Example:

$ganttgraph->SetSundayFontColor('red');

 

HeaderProperty ::
SetTitleVertMargin($aMargin)
Specify margin above and below text in scale

ArgumentDefaultDescription
$aMargin  Margin in pixels

Description:
Specify margin above and below text in scale 

Example:

$ganttgraph->scale->year->SetTitleVertMargin(7);

 

HeaderProperty ::
SetWeekendColor($aColor)
Only valid if if used by day scale

ArgumentDefaultDescription
$aColor  Background color for the weekend

Description:
Specify the background color for weekends.

Tip: If you want the weekend background color to continue down the gantt chart theh use the GanttScale::UseWeekendBackground() method.  
 

See also:

Example:

$ganttgraph->scale->day->SetWeekendColor('lightgray');