Example #1
0
<?php

use Atompulse\Graph\Graph;
$graph = new Graph(450, 300);
$data = array("Jan" => -10.1, "Feb" => -3.6, "Mar" => 11.0, "Apr" => 30.7, "May" => 48.6, "Jun" => 59.8, "Jul" => 62.5, "Aug" => 56.8, "Sep" => 45.5, "Oct" => 25.1, "Nov" => 2.7, "Dec" => -6.5);
$graph->addData($data);
$graph->setBarColor('navy');
$graph->setupXAxis(20, 'blue');
$graph->setTitle('Average Temperature by Month, in Fairbanks Alaska');
$graph->setTitleColor('blue');
$graph->setGridColor('153,204,255');
$graph->setDataValues(true);
$graph->setDataValueColor('navy');
$graph->setDataFormat('degrees');
$graph->setGoalLine('32');
$graph->setGoalLineColor('red');
$graph->createGraph();
Example #2
0
<?php

use Atompulse\Graph\Graph;
$graph = new Graph(650, 200);
$data = array("1" => 0.0032, "2" => 0.0028, "3" => 0.0021, "4" => 0.0033, "5" => 0.0034, "6" => 0.0031, "7" => 0.0036, "8" => 0.0027, "9" => 0.0024, "10" => 0.0021, "11" => 0.0026, "12" => 0.0024, "13" => 0.0036, "14" => 0.0028, "15" => 0.0025);
$graph->addData($data);
$graph->setTitle('PPM Per Container');
$graph->setBars(false);
$graph->setLine(true);
$graph->setDataPoints(true);
$graph->setDataPointColor('maroon');
$graph->setDataValues(true);
$graph->setDataValueColor('maroon');
$graph->setGoalLine(0.0025);
$graph->setGoalLineColor('red');
$graph->createGraph();