Location: PHPKode > projects > Monyet > plotter/jpgraph-2.2/src/Examples/horizbarex2.php
include ("../jpgraph.php");
include ("../jpgraph_bar.php");



// Set the basic parameters of the graph 
$graph = new Graph($width,$height,'auto');

$top = 80;
$bottom = 30;
$left = 50;
$right = 30;

// Nice shadow

// Setup title
$graph->title->Set("Horizontal bar graph ex 2");
$graph->subtitle->Set("(Axis at top)");

// Setup X-axis

// Some extra margin looks nicer

// Label align for X-axis

// Add some grace to y-axis so the bars doesn't go
// all the way to the end of the plot area

// We don't want to display Y-axis

// Now create a bar pot
$bplot = new BarPlot($datay);

//You can change the width of the bars if you like

// We want to display the value of each bar at the top
$bplot->value->SetFormat('%.1f mkr');

// Add the bar to the graph

Return current item: Monyet