The scale headers allow you to view up to four different scales at the same time. The four basic scales are:
You can choose what scale to include and exclude by using the SetScale() method. For example, for a detailed gantt you might choose to display days and weeks by specifying
$graph ->ShowHeaders ( GANTT_HWEEK | GANTT_DAY );
If you instead wanted "the big picture" it might be enough to show year and months by specifying
$graph->ShowHeaders( GANTT_YEAR | GANTT_MONTH );
You can choose freely the combination of scales that you want, but a chart must at least have one scale of course.
Once you have decided what level of details you need you can then fine tune the exact layout/formatting of each of the enabled scales as described below.
These scale header are all accessed through the graph instance variables 'scale' as in
. All these headers share the following properties.
Determine if the scale should be shown or not
Font for text in header
Specify the color of the header text
Specify what date format should be used, for example in the week scale it is possible to show either week number, the start date of the week and so on.
As it says, the background color for the header
The line weight of the box around the scale
The line color for the frame
The margin, in percent, below and above the title text
In addition to these methods each scale also has the property 'grid' which determines the appearance of grid lines for that specific scale. You may modify the appearance of grid lines by the "normal" line methods, i.e. SetColor(),SetWeight() SetStyle() and Show(). So for example to set the week grid line red you would use
$graph ->scale->week-> grid->SetColor("red" );
Each of the scales also have some specific formatting possibilities as described below.