Example #1
0
$graph->scale->minute->SetStyle(MINUTESTYLE_MM);
$graph->scale->minute->grid->SetColor('lightgray');
$graph->scale->tableTitle->Set('Phase 1');
$graph->scale->tableTitle->SetFont(FF_ARIAL, FS_NORMAL, 12);
$graph->scale->SetTableTitleBackground('darkgreen@0.6');
$graph->scale->tableTitle->Show(true);
$graph->title->Set("Example of hours & mins scale");
$graph->title->SetColor('darkgray');
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14);
for ($i = 0; $i < count($data); ++$i) {
    $bar = new GanttBar($data[$i][0], $data[$i][1], $data[$i][2], $data[$i][3]);
    if (count($data[$i]) > 4) {
        $bar->title->SetFont($data[$i][4], $data[$i][5], $data[$i][6]);
    }
    $bar->SetPattern(BAND_RDIAG, "yellow");
    $bar->SetFillColor("gray");
    $graph->Add($bar);
}
//$vline = new GanttVLine("2001-11-27");//d=1006858800,
$vline = new GanttVLine("2001-11-27 9:00");
//d=1006858800,
$vline->SetWeight(5);
$vline->SetDayOffset(0);
$vline->title->Set("27/11 9:00");
$vline->title->SetFont(FF_FONT1, FS_BOLD, 10);
$graph->Add($vline);
$graph->Stroke();
?>