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(300, 175);
14
$graph->setAntiAliasing(TRUE);
15
 
16
$graph->title->set("Stats");
17
$graph->title->setFont(new TuffyItalic(16));
18
 
19
$values = array(8, 4, 6, 2, 5, 3, 4);
20
 
21
$plot = new Pie($values, Pie::EARTH);
22
$plot->setCenter(0.4, 0.55);
23
$plot->setSize(0.7, 0.6);
24
$plot->set3D(10);
25
$plot->explode(array(1 => 14, 4 => 20, 0 => 10));
26
 
27
$plot->setLegend(array(
28
	'Mon',
29
	'Tue',
30
	'Wed',
31
	'Thu',
32
	'Fri',
33
	'Sat',
34
	'Sun'
35
));
36
 
37
$plot->legend->setPosition(1.3);
38
 
39
$graph->add($plot);
40
$graph->draw();
41
 
42
?>