Contents Previous Next

10.8 Formatting the scale headers

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 ->ShowHeadersGANTT_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

 $graph->scale-> week



. All these headers share the following properties.

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.

Contents Previous Next