Contents Previous Next

10.12.4 Horizontal grids and alternating line colors

In order to make large charts easier to read it is possible to specify alternating an horizontal grid and optional alternating line colors in the background for Gantt charts. The horizontal grid is accessed through the Graph::hgrid property and the line (used in the grid) is accessed through the Graph::hgrid::line sub-property

In order to specify the alternating line colors the SetRowFillColor() method is used. For example, to use alternating blue background with blue grid line the following lines would have to be added to the graph script

  // Setup a horizontal grid
$graph->hgrid-> Show();
$graph->hgrid-> line->SetColor('lightblue' );
$graph->hgrid-> SetRowFillColor( 'darkblue@0.9');

Below is an example of a Gantt graph using this formatting



Figure 165: Adding a horizontal grid to the graph [src] 


Contents Previous Next