forked from jeroenst/phpgraphlib
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample3.php
More file actions
23 lines (22 loc) · 721 Bytes
/
example3.php
File metadata and controls
23 lines (22 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
use Atompulse\Graph\Graph;
$graph = new Graph(350,280);
$data = array("Roger" => 145, "Ralph" => 102, "Rhonda" => 123,
"Ronaldo" => 137, "Rosario" => 149, "Robin" => 99,
"Robert" => 88, "Rustof" => 111);
$graph->setBackgroundColor("black");
$graph->addData($data);
$graph->setBarColor('255, 255, 204');
$graph->setTitle('IQ Scores');
$graph->setTitleColor('yellow');
$graph->setupYAxis(12, 'yellow');
$graph->setupXAxis(20, 'yellow');
$graph->setGrid(false);
$graph->setGradient('silver', 'gray');
$graph->setBarOutlineColor('white');
$graph->setTextColor('white');
$graph->setDataPoints(true);
$graph->setDataPointColor('yellow');
$graph->setLine(true);
$graph->setLineColor('yellow');
$graph->createGraph();