Contents Previous Next

10.8.1 Minute scale

Minute scale is the lowest resolution you can use. It is often convenient to use Minute scale with "GanttScale::SetINtervall()" since by default the increment will be 1 minute. The style of minute scale can be further adjusted by the use style parameters which can be one of

  1. "MINUTESTYLE_MM", This will display minutes as a two digit number with a leading zero if necessary
  2. "MINUTESTYLE_CUSTOM", This will let you specify you own custom minute style by making a call to HeaderProperty:: SetFormatString()

Minute scale is enabled by adding the GANTT_HMIN in the GanttGraph::ShowHeaders() call. For example as in

 $graph ->ShowHeaders(GANTT_HDAY  GANTT_HHOUR  GANTT_HMIN);

The code snippet below shows how to set up a minute scale with 30 min interval and some custom colors.

 $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');


Contents Previous Next