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 "../../LinePlot.class.php";
11
 
12
 
13
$graph = new Graph(500, 100);
14
 
15
$graph->setAntiAliasing(TRUE);
16
$graph->border->hide();
17
 
18
$x = array();
19
for($i = 0; $i < 20; $i++) {
20
	$x[] = mt_rand(4, 12);
21
}
22
 
23
$plot = new LinePlot($x);
24
 
25
$plot->setSpace(0, 0, 50, 0);
26
$plot->setPadding(3, 3, 3, 3);
27
 
28
$plot->setBackgroundGradient(
29
	new LinearGradient(
30
		new Color(230, 230, 230),
31
		new Color(255, 255, 255),
32
 
33
	)
34
);
35
 
36
$plot->setColor(new Color(0, 0, 180, 20));
37
 
38
$plot->setFillGradient(
39
	new LinearGradient(
40
		new Color(220, 220, 230, 25),
41
		new Color(240, 240, 255, 25),
42
		90
43
	)
44
);
45
 
46
$plot->xAxis->hide(TRUE);
47
$plot->yAxis->hide(TRUE);
48
 
49
$graph->add($plot);
50
$graph->draw();
51
?>