Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
include ("../jpgraph.php");
3
include ("../jpgraph_bar.php");
4
 
5
// Some data
6
$databary=array(12,7,16,6,7,14,9,3);
7
$months=$gDateLocale->GetShortMonth();
8
 
9
// New graph with a drop shadow
10
$graph = new Graph(300,200,'auto');
11
$graph->SetShadow();
12
 
13
// Use a "text" X-scale
14
$graph->SetScale("textlin");
15
 
16
// Specify X-labels
17
$graph->xaxis->SetTickLabels($months);
18
 
19
// Set title and subtitle
20
$graph->title->Set("Textscale with specified labels");
21
 
22
// Use built in font
23
$graph->title->SetFont(FF_FONT1,FS_BOLD);
24
 
25
// Create the bar plot
26
$b1 = new BarPlot($databary);
27
$b1->SetLegend("Temperature");
28
 
29
//$b1->SetAbsWidth(6);
30
//$b1->SetShadow();
31
 
32
// The order the plots are added determines who's ontop
33
$graph->Add($b1);
34
 
35
// Finally output the  image
36
$graph->Stroke();
37
 
38
?>
39
 
40