source: trunk/xgraph/jpgraph/Examples/ganttcsimex01.php

Last change on this file was 42, checked in by marrucho, 10 years ago
File size: 825 bytes
Line 
1<?php // content="text/plain; charset=utf-8"
2// Gantt example to create CSIM
3
4require_once ('jpgraph/jpgraph.php');
5require_once ('jpgraph/jpgraph_gantt.php');
6
7$bar1 = new GanttBar(0,"Activity 1","2001-12-21","2002-01-20");
8$bar1->SetCSIMTarget('#','Go back 1');
9$bar1->title->SetCSIMTarget('#','Go back 1 (title)');
10$bar2 = new GanttBar(1,"Activity 2","2002-01-03","2002-01-25");
11$bar2->SetCSIMTarget('#','Go back 2');
12$bar2->title->SetCSIMTarget('#','Go back 2 (title)');
13
14$graph = new GanttGraph(500);
15$graph->title->Set("Example with image map");
16$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK);
17$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);
18$graph->scale->week->SetFont(FF_FONT1);
19
20$graph->Add(array($bar1,$bar2));
21
22// And stroke
23$graph->StrokeCSIM();
24
25
26?>
27
28
Note: See TracBrowser for help on using the repository browser.