1 | <?php
|
---|
2 | require_once ('jpgraph/jpgraph.php');
|
---|
3 | require_once ('jpgraph/jpgraph_canvas.php');
|
---|
4 | require_once ('jpgraph/jpgraph_table.php');
|
---|
5 |
|
---|
6 | // Setup a basic canvas graph context
|
---|
7 | $graph = new CanvasGraph(630,600);
|
---|
8 |
|
---|
9 | // Setup the basic table
|
---|
10 | $data = array(
|
---|
11 | array('GROUP 1O', 'w631','w632','w633','w634','w635','w636'),
|
---|
12 | array('Critical (sum)',13,17,15,8,3,9),
|
---|
13 | array('High (sum)',34,35,26,20,22,16),
|
---|
14 | array('Low (sum)',41,43,49,45,51,47),
|
---|
15 | array('Sum:',88,95,90,73,76,72)
|
---|
16 | );
|
---|
17 |
|
---|
18 | // Setup a basic table
|
---|
19 | $table = new GTextTable();
|
---|
20 | $table->Set($data);
|
---|
21 | $table->SetAlign('right');
|
---|
22 | $table->SetFont(FF_TIMES,FS_NORMAL,12);
|
---|
23 | $table->SetCellFont(0,0,FF_ARIAL,FS_BOLD,16);
|
---|
24 |
|
---|
25 | // Rotate the entire table 90 degrees
|
---|
26 | $table->SetTextOrientation(90);
|
---|
27 | //$table->SetCellTextOrientation(0,0,0);
|
---|
28 |
|
---|
29 | // Setup background color for header column
|
---|
30 | $table->SetColFillColor(0,'lightgray');
|
---|
31 |
|
---|
32 | // Set the imnimum row height
|
---|
33 | $table->SetMinRowHeight(0,150);
|
---|
34 |
|
---|
35 | // Add table to graph
|
---|
36 | $graph->Add($table);
|
---|
37 |
|
---|
38 | // and send it back to the client
|
---|
39 | $graph->Stroke();
|
---|
40 |
|
---|
41 | ?>
|
---|
42 |
|
---|