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

Last change on this file was 42, checked in by marrucho, 10 years ago
File size: 591 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// Create a basic graph context
13$graph = new CanvasGraph(300,200);
14
15// Create a basic table
16$table = new GTextTable($cols,$rows);
17$table->Set($data);
18
19//Add table to the graph
20$graph->Add($table);
21
22// Send back table to the client
23$graph->Stroke();
24
25?>
Note: See TracBrowser for help on using the repository browser.