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->setBackgroundGradient(
15
	new LinearGradient(
16
		new White,
17
		new VeryLightGray(40),
18
 
19
	)
20
);
21
$graph->title->set("Horses");
22
$graph->shadow->setSize(5);
23
$graph->shadow->smooth(TRUE);
24
$graph->shadow->setPosition(Shadow::LEFT_BOTTOM);
25
$graph->shadow->setColor(new DarkGray);
26
 
27
$values = array(8, 4, 6, 2, 5);
28
 
29
$plot = new Pie($values);
30
$plot->setCenter(0.35, 0.55);
31
$plot->setSize(0.7, 0.6);
32
$plot->set3D(10);
33
$plot->setLabelPosition(10);
34
 
35
$plot->setLegend(array(
36
	'France',
37
	'Spain',
38
	'Italy',
39
	'Germany',
40
	'England'
41
));
42
 
43
$plot->legend->setPosition(1.40);
44
$plot->legend->shadow->setSize(0);
45
$plot->legend->setBackgroundColor(new VeryLightGray(30));
46
 
47
$graph->add($plot);
48
$graph->draw();
49
 
50
?>