CLASS GanttScale
(Defined in: jpgraph_gantt.php : 1834)
 GanttScale 
 SetDateLocale() 
 SetRange() 
 SetTableTitleBackground() 
 SetVertLayout() 
 SetWeekStart() 
 UseWeekendBackground() 
 

Class usage and Overview
Internal class to represent the scale used for Gantt graphs. The scale is accessible as GanttGraph::scale The following public available subobjects are available

 

See also related classes:
GanttGraph, HeaderProperty, GanttActivityInfo and TextProperty

 


Class Methods

 

 

function SetDateLocale($aLocale)
Specify locale to use for scale.

ArgumentDefaultDescription
$aLocale  String to specify locale

Description
Specify locale to use for scale. If no locale is specified then the default locale for the installed system will be used. 
 
See also
DateLocale::DateLocale

Example

$ganttgraph->scale->SetDateLocale('US_en');

 

 

function SetRange($aMin,$aMax)
Specify date range for scale.

ArgumentDefaultDescription
$aMin  Min date
$aMax  Max date

Description
Specify scale min and max date either as timestamp or as date strings. Always round to the nearest week boundary 

Example

$ganttgraph->scale->SetRange("2002-11-23", "2003-03-31");

 

 

function SetTableTitleBackground($aColor)
Specify background for the table title area.

ArgumentDefaultDescription
$aColor  Color

Description
Specify background for the table title area (upper left corner of the table). 

Example

$ganttgraph->scale->SetTableTitleBackground('lightblue');

 

 

function SetVertLayout($aLayout)
Specify the vertical layout fro rows.

ArgumentDefaultDescription
$aLayout  Vertical layout parameter

Description
Should the layout be from top or even. Valid parameters are Note that if you use auto-sizing of the Gantt chart these parameters have little effect since the total height of the image will always be so that all rows fit exactly.  

Example

$granntgraph->scale->SetVertLayout(GANTT_FROMTOP);

 

 

function SetWeekStart($aStartDay)
Specify which weekday should start the week

ArgumentDefaultDescription
$aStartDay  Weekday, (0-6)

Description
Which day should the week start? 0==Sun, 1==Monday, 2==Tuesday etc By default weeks start on Mondays. 
 
See also
GanttScale::SetRange

Example

$granttgraph->SetWeekStart(1);

 

 

function UseWeekendBackground($aShow)
Determine if the background color for weekends in the scale should extend down in the plot area.

ArgumentDefaultDescription
$aShow  True=Use the weekend background color in the ganttgraph

Description
Determine if the background color for weekends in the scale should extend down in the plot area. 

Example

$ganttgraph->scale->USeWeekendBackground();