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


// Size of graph

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

// No frame around the image

// Rotate graph 90 degrees and set margin

// Set white margin color

// Use a box around the plot area

// Use a gradient to fill the plot area

// Setup title
$graph->title->Set("Graphic card performance");
$graph->subtitle->Set("(Non optimized)");

// 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

// Set gradient fill for bars

// We want to display the value of each bar at the top

// Add the bar to the graph

// Add some explanation text
$txt = new Text('Note: Higher value is better.');

// .. and stroke the graph
Return current item: Monyet