Subversion Repositories Applications.gtt

Rev

Go to most recent revision | Details | 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, 250);
14
$graph->setAntiAliasing(TRUE);
15
 
16
$graph->title->set("Pie (example 13) - Adjusting labels");
17
 
18
$values = array(16, 9, 13, 23, 10);
19
 
20
$plot = new Pie($values, Pie::EARTH);
21
$plot->setCenter(0.4, 0.55);
22
$plot->setAbsSize(220, 220);
23
 
24
$plot->setLegend(array(
25
	'Mon',
26
	'Tue',
27
	'Wed',
28
	'Thu',
29
	'Fri',
30
	'Sat',
31
	'Sun'
32
));
33
 
34
$plot->setLabelPosition(-40);
35
$plot->label->setPadding(2, 2, 2, 2);
36
$plot->label->setFont(new Tuffy(7));
37
$plot->label->setBackgroundColor(new White(60));
38
 
39
$plot->legend->setPosition(1.3);
40
$plot->legend->shadow->setSize(0);
41
 
42
$graph->add($plot);
43
$graph->draw();
44
 
45
?>