Subversion Repositories Applications.gtt

Rev

Rev 61 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
60 jpm 1
<?php
2
/*
3
 * This work is hereby released into the Public Domain.
4
 * To view a copy of the public domain dedication,
5
 * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
6
 * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
7
 *
8
 */
9
 
10
require_once "../Pie.class.php";
11
 
12
 
13
$graph = new Graph(400, 300);
14
$graph->setAntiAliasing(TRUE);
15
 
16
$graph->title->set("Pie (example 8)");
17
 
18
$values = array(8, 4, 6, 2, 5, 3, 4);
19
 
20
$plot = new Pie($values, Pie::EARTH);
21
$plot->setSize(0.85, 0.60);
22
$plot->set3D(15);
23
$plot->setBorderColor(new LightGray);
24
 
25
$plot->setLegend(array(
26
	'Mon',
27
	'Tue',
28
	'Wed',
29
	'Thu',
30
	'Fri',
31
	'Sat',
32
	'Sun'
33
));
34
 
35
$plot->legend->shadow->setSize(3);
36
$plot->legend->setModel(Legend::MODEL_BOTTOM);
37
$plot->legend->setPosition(NULL, 1.1);
38
 
39
$plot->label->setPadding(2, 2, 2, 2);
40
$plot->label->border->setColor(new Red(60));
41
$plot->label->setFont(new Tuffy(7));
42
$plot->label->setBackgroundGradient(
43
	new LinearGradient(
44
		new Red(80),
45
		new White(80),
46
 
47
	)
48
);
49
$plot->setLabelPrecision(1);
50
 
51
$graph->add($plot);
52
$graph->draw();
53
 
54
?>