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
include ("../jpgraph_line.php");
6
 
7
 
8
$ydata = array(12,15,22,19,5);
9
 
10
$graph = new Graph(400,200);
11
$graph->img->SetMargin(40,80,40,40);
12
$graph->SetScale("textlin");
13
$graph->SetShadow();
14
 
15
$graph->title->Set('Center the line points in bars');
16
 
17
$line = new LinePlot($ydata);
18
$line->SetBarCenter();
19
$line->SetWeight(2);
20
 
21
$bar = new BarPlot($ydata);
22
$bar2 = new BarPlot($ydata);
23
$bar2->SetFillColor("red");
24
 
25
$gbar = new GroupbarPlot(array($bar,$bar2));
26
 
27
$graph->Add($gbar);
28
$graph->Add($line);
29
 
30
// Output line
31
$graph->Stroke();
32
 
33
?>
34
 
35