Rev | Line | |
---|
[42] | 1 | <?php // content="text/plain; charset=utf-8" |
---|
| 2 | // Gantt example to create CSIM |
---|
| 3 | |
---|
| 4 | require_once ('jpgraph/jpgraph.php'); |
---|
| 5 | require_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.