1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
| <?php
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_canvas.php';
require_once 'jpgraph/jpgraph_table.php';
require_once 'jpgraph/jpgraph_iconplot.php';
require_once 'jpgraph/jpgraph_flags.php';
$graph = new CanvasGraph(700,300);
$data = array(
array('', 'April', 'May','June','July','August'),
array('', 'Triumph', 'Triump','Triumph','Triumph','Triumph'),
array('2005',7,13,17,15,8),
array('2006',7,34,35,26,20),
array('2007',7,41,43,49,45),
array('Sum:',21,88,95,90,73)
);
$table = new GTextTable();
$table->Set($data);
$table->SetFont(FF_TIMES,FS_NORMAL,11);
$table->SetAlign('left','top');
$table->SetRowFont(0,FF_ARIAL,FS_BOLD,12);
$table->SetRowColor(0,'white');
$table->SetRowAlign(0,'center');
$table->SetRowFillColor(0,'darkorange');
$table->SetRowFont(1,FF_ARIAL,FS_BOLD,12);
$table->SetRowColor(1,'white');
$table->SetRowFont(5,FF_ARIAL,FS_BOLD,12);
$table->SetGrid(1);
lightgray@0.
$table->SetColFillColor(0,'lightgray@0.5');
$table->SetFillColor(0,0,4,0,'lightgray@0.5');
$table->SetMinColWidth(2,100);
$table->SetRowAlign(1,'center','top');
for( $i=1; $i <= 5; ++$i ) {
$table->SetCellImage(1,$i,"tr$i.jpg");
$table->SetCellImageConstrain(1,$i,TIMG_HEIGHT,80);
}
$graph->Add($table);
$graph->Stroke();
?> |