| Server IP : 172.67.187.206 / Your IP : 172.71.28.155 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/myschool/triamudom/check/webadmin/S_Graph/jpgraph/Examples/ |
Upload File : |
<?php
require_once ('../jpgraph.php');
require_once ('../jpgraph_line.php');
$datay = array(0,3,5,12,15,18,22,36,37,41);
// Setup the graph
$graph = new Graph(320,200);
$graph->title->Set('Education growth');
$graph->title->SetFont(FF_ARIAL,FS_BOLD,14);
$graph->SetScale('intlin');
$graph->SetMarginColor('white');
$graph->SetBox();
//$graph->img->SetAntialiasing();
$graph->SetGridDepth(DEPTH_FRONT);
$graph->ygrid->SetColor('[email protected]');
$graph->SetBackgroundImage('classroom.jpg',BGIMG_FILLPLOT);
// Masking graph
$p1 = new LinePlot($datay);
$p1->SetFillColor('white');
$p1->SetFillFromYMax();
$p1->SetWeight(0);
$graph->Add($p1);
// Line plot
$p2 = new LinePlot($datay);
$p2->SetColor('[email protected]');
$p2->SetWeight(3);
$p2->mark->SetType(MARK_SQUARE);
$p2->mark->SetColor('[email protected]');
$p2->mark->SetFillColor('[email protected]');
$graph->Add($p2);
// Output line
$graph->Stroke();
?>