<?php 
 
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_bar.php');
 
$datay=array(4,8,6);
 
$graph = new Graph(200,150);    
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);
 
$graph->title->Set('"GRAD_CENTER"');
$graph->title->SetColor('darkred');
 
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);
 
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);
 
$bplot->SetFillGradient("navy","lightsteelblue",GRAD_CENTER);
 
$bplot->SetColor("navy");
$graph->Add($bplot);
 
$graph->Stroke();
?> |