Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
include ("../jpgraph.php");
4
include ("../jpgraph_bar.php");
5
 
6
// We need some data
7
$datay=array(4,8,6);
8
 
9
// Setup the graph.
10
$graph = new Graph(200,150,"auto");
11
$graph->SetScale("textlin");
12
$graph->img->SetMargin(25,15,25,25);
13
 
14
$graph->title->Set('"GRAD_VER"');
15
$graph->title->SetColor('darkred');
16
 
17
// Setup font for axis
18
$graph->xaxis->SetFont(FF_FONT1);
19
$graph->yaxis->SetFont(FF_FONT1);
20
 
21
// Create the bar pot
22
$bplot = new BarPlot($datay);
23
$bplot->SetWidth(0.6);
24
 
25
// Setup color for gradient fill style
26
$bplot->SetFillGradient("navy","lightsteelblue",GRAD_VER);
27
 
28
// Set color for the frame of each bar
29
$bplot->SetColor("navy");
30
$graph->Add($bplot);
31
 
32
// Finally send the graph to the browser
33
$graph->Stroke();
34
?>