| <?php 
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_bar.php');
 
for($i=0; $i < 12; ++$i) {
    $databary[$i] = rand(1,20);
}
$months=$gDateLocale->GetShortMonth();
 
$graph = new Graph(300,200);
$graph->SetShadow();
 
$graph->SetScale('textlin');
 
$graph->xaxis->SetTickLabels($months);
$graph->xaxis->SetTextLabelInterval(2);
 
$graph->title->Set('Textscale with tickinterval=2');
 
$graph->title->SetFont(FF_FONT1,FS_BOLD);
 
$b1 = new BarPlot($databary);
$b1->SetLegend('Temperature');
 
$graph->Add($b1);
 
$graph->Stroke();
 
?> |