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 "../../LinePlot.class.php";
11
 
12
 
13
$graph = new Graph(300, 175);
14
 
15
$graph->setAntiAliasing(TRUE);
16
 
17
$x = array(
18
	3, 1, 5, 6, 3, 8, 6
19
);
20
 
21
$plot = new LinePlot($x);
22
 
23
$plot->grid->setNoBackground();
24
 
25
$plot->title->set("Filled line and marks");
26
$plot->title->setFont(new Tuffy(10));
27
$plot->title->setBackgroundColor(new Color(255, 255, 255, 25));
28
$plot->title->border->show();
29
$plot->title->setPadding(3, 3, 3, 3);
30
$plot->title->move(-20, 25);
31
 
32
$plot->setSpace(4, 4, 10, 0);
33
$plot->setPadding(25, 15, 10, 18);
34
 
35
$plot->setBackgroundGradient(
36
	new LinearGradient(
37
		new Color(210, 210, 210),
38
		new Color(255, 255, 255),
39
 
40
	)
41
);
42
 
43
$plot->setColor(new Color(0, 0, 150, 20));
44
 
45
$plot->setFillGradient(
46
	new LinearGradient(
47
		new Color(150, 150, 210),
48
		new Color(245, 245, 245),
49
 
50
	)
51
);
52
 
53
$plot->mark->setType(Mark::CIRCLE);
54
$plot->mark->border->show();
55
 
56
$y = array(
57
	'Lundi',
58
	'Mardi',
59
	'Mercredi',
60
	'Jeudi',
61
	'Vendredi',
62
	'Samedi',
63
	'Dimanche'
64
);
65
 
66
$plot->xAxis->setLabelText($y);
67
$plot->xAxis->label->setFont(new Tuffy(7));
68
 
69
$graph->add($plot);
70
$graph->draw();
71
?>