source: trunk/xgraph/jpgraph/Examples/tableex01.php @ 42

Last change on this file since 42 was 42, checked in by marrucho, 10 years ago
File size: 720 bytes
Line 
1<?php
2require_once ('jpgraph/jpgraph.php');
3require_once ('jpgraph/jpgraph_canvas.php');
4require_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$graph = new CanvasGraph(300,200);
13
14$table = new GTextTable($cols,$rows);
15$table->Init();
16$table->Set($data);
17
18$table->SetRowFont(0,FF_FONT1,FS_BOLD);
19$table->SetRowColor(0,'navy');
20$table->SetRowFillColor(0,'lightgray');
21
22$table->SetColFont(0,FF_FONT1,FS_BOLD);
23$table->SetColColor(0,'navy');
24$table->SetColFillColor(0,'lightgray');
25
26$graph->Add($table);
27$graph->Stroke();
28
29?>
Note: See TracBrowser for help on using the repository browser.