<?php
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_line.php');
$datay1 = array(4,26,12,18,8,22);
$datay2 = array(12,9,42,8,20,19);
$graph = new Graph(300,200);
$graph->SetMarginColor('white');
$graph->SetScale("textlin",0,50);
$graph->SetMargin(30,50,30,30);
$graph->SetFrame(true,'white');
$graph->SetBackgroundGradient('blue','navy:0.5',GRAD_HOR,BGRAD_PLOT);
$graph->tabtitle->Set(' 3rd Division ' );
$graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,13);
$graph->xgrid->Show();
$graph->xgrid->SetColor('gray@0.5');
$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());
$graph->ygrid->SetColor('gray@0.5');
$graph->xaxis->SetColor('orange','black');
$graph->yaxis->SetColor('orange','black');
$graph->xaxis->SetTickSide(SIDE_DOWN);
$graph->yaxis->SetTickSide(SIDE_LEFT);
$graph->legend->SetColor('white','navy');
$graph->legend->SetFillColor('navy@0.25');
$graph->legend->SetFont(FF_ARIAL,FS_BOLD,8);
$graph->legend->SetShadow('darkgray@0.4',3);
$graph->legend->SetPos(0.05,0.05,'right','top');
$p1 = new LinePlot($datay1);
$p1->SetColor("red");
$p1->SetWeight(2);
$p1->SetLegend('2002');
$graph->Add($p1);
$p2 = new LinePlot($datay2);
$p2->SetColor("lightyellow");
$p2->SetLegend('2001');
$p2->SetWeight(2);
$graph->Add($p2);
$graph->Stroke();
?> |