1 | <?php |
---|
2 | require_once ('jpgraph/jpgraph.php'); |
---|
3 | require_once ('jpgraph/jpgraph_canvas.php'); |
---|
4 | require_once ('jpgraph/jpgraph_table.php'); |
---|
5 | |
---|
6 | $cols = 4; |
---|
7 | $rows = 3; |
---|
8 | $data = array( array('','Jan','Feb','Mar','Apr'), |
---|
9 | array('Min','15.2', '12.5', '9.9', '70.0'), |
---|
10 | array('Max','23.9', '14.2', '18.6', '71.3')); |
---|
11 | |
---|
12 | // Setup basic graph canvas |
---|
13 | $graph = new CanvasGraph(300,200); |
---|
14 | |
---|
15 | // Create a basic table |
---|
16 | $table = new GTextTable($cols,$rows); |
---|
17 | $table->Set($data); |
---|
18 | |
---|
19 | $table->SetCellCSIMTarget(1,1,'tableex02.php','View details'); |
---|
20 | |
---|
21 | $table->SetRowFont(0,FF_FONT1,FS_BOLD); |
---|
22 | $table->SetRowColor(0,'navy'); |
---|
23 | $table->SetRowFillColor(0,'lightgray'); |
---|
24 | |
---|
25 | $table->SetColFont(0,FF_FONT1,FS_BOLD); |
---|
26 | $table->SetColColor(0,'navy'); |
---|
27 | $table->SetColFillColor(0,'lightgray'); |
---|
28 | |
---|
29 | $graph->Add($table); |
---|
30 | |
---|
31 | $graph->StrokeCSIM(); |
---|
32 | |
---|
33 | ?> |
---|