<?php
@header("Content-Type: text/html; charset=UTF-8");
// Example for use of JpGraph,
// ljp, 01/03/01 20:32
require("jpgraph/src/jpgraph.php"); //this is path of tool
require("jpgraph/src/jpgraph_bar.php");
//require("jpgraph/src/jpgraph_flags.php");
// We need some data
$datay=array(0.13,0.25,0.21,0.35,0.31,0.06);
//$graph->title->SetFont(FF_TAHOMA,FS_NORMAL,12);
$graph->title->SetColor("darkred");
$graph->legend->SetFont(FF_TAHOMA,FS_BOLD);
// Setup font for axis
$graph->xaxis->SetFont(FF_TAHOMA,FS_NORMAL,12);
$graph->yaxis->SetFont(FF_TAHOMA,FS_NORMAL,12);
// Show 0 label on Y-axis (default is not to show)
$graph->yscale->ticks->SupressZeroLabel(false);
// Setup X-axis labels
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetLabelAngle(50);
// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);
// Setup color for gradient fill style
$bplot->SetFillGradient("navy","#EEEEEE",GRAD_LEFT_REFLECTION);
// Set color for the frame of each bar
$bplot->SetColor("white");
$graph->Add($bplot);
$bplot->value->Show();
// Finally send the graph to the browser
$graph->xaxis->SetFont(FF_ANGSA,FS_BOLD,20);
$graph->Stroke();