forked from jeroenst/phpgraphlib
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample9.php
More file actions
20 lines (19 loc) · 707 Bytes
/
example9.php
File metadata and controls
20 lines (19 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
use Atompulse\Graph\Graph;
$graph = new Graph(495, 280);
$data = array('alpha' => 23, 'beta' => 45, 'cappa' => 20,
'delta' => 32, 'echo' => 14);
$data2 = array('alpha' => 15, 'beta' => 23, 'cappa' => 23,
'delta' => 12, 'echo' => 17);
$data3 = array('alpha' => 43, 'beta' => 23, 'cappa' => 34,
'delta' => 16, 'echo' => 20);
$data4 = array('alpha' => 23, 'beta' => 34, 'cappa' => 23,
'delta' => 9, 'echo' => 8);
$graph->addData($data, $data2, $data3, $data4);
$graph->setupYAxis("15");
$graph->setGradient('teal', '#0000FF');
$graph->setXValuesHorizontal(true);
$graph->setXAxisTextColor ('navy');
$graph->setLegend(true);
$graph->setLegendTitle('M1', 'M2', 'M3', 'M4');
$graph->createGraph();