Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
include_once ("../jpgraph.php");
3
include_once ("../jpgraph_pie.php");
4
include_once ("../jpgraph_pie3d.php");
5
 
6
//$gJpgBrandTiming=true;
7
 
8
// Some data
9
$data = array(40,21,17,27,23);
10
 
11
// Create the Pie Graph.
12
$graph = new PieGraph(400,200,'auto');
13
$graph->SetShadow();
14
 
15
// Set A title for the plot
16
$graph->title->Set("3D Pie Client side image map");
17
$graph->title->SetFont(FF_FONT1,FS_BOLD);
18
 
19
// Create
20
$p1 = new PiePlot3D($data);
21
$p1->SetLegends(array("Jan (%d)","Feb","Mar","Apr","May","Jun","Jul"));
22
$targ=array("pie3d_csimex1.php?v=1","pie3d_csimex1.php?v=2","pie3d_csimex1.php?v=3",
23
			"pie3d_csimex1.php?v=4","pie3d_csimex1.php?v=5","pie3d_csimex1.php?v=6");
24
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
25
$p1->SetCSIMTargets($targ,$alts);
26
 
27
// Use absolute labels
28
$p1->SetLabelType(1);
29
$p1->value->SetFormat("%d kr");
30
 
31
// Move the pie slightly to the left
32
$p1->SetCenter(0.4,0.5);
33
 
34
$graph->Add($p1);
35
 
36
 
37
// Send back the HTML page which will call this script again
38
// to retrieve the image.
39
$graph->StrokeCSIM('pie3d_csimex1.php');
40
 
41
?>
42
 
43