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

Last change on this file was 42, checked in by marrucho, 10 years ago
File size: 829 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// 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?>
Note: See TracBrowser for help on using the repository browser.