1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
| <?php
/*
* This work is hereby released into the Public Domain.
* To view a copy of the public domain dedication,
* visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
* Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
*
*/
require_once "../LinePlot.class.php";
$graph = new Graph(300, 175);
$graph->setAntiAliasing(TRUE);
$x = array(
3, 1, 5, 6, 3, 8, 6
);
$plot = new LinePlot($x);
$plot->grid->setNoBackground();
$plot->title->set("Filled line and marks");
$plot->title->setFont(new Tuffy(10));
$plot->title->setBackgroundColor(new Color(255, 255, 255, 25));
$plot->title->border->show();
$plot->title->setPadding(3, 3, 3, 3);
$plot->title->move(-20, 25);
$plot->setSpace(4, 4, 10, 0);
$plot->setPadding(25, 15, 10, 18);
$plot->setBackgroundGradient(
new LinearGradient(
new Color(210, 210, 210),
new Color(255, 255, 255),
0
)
);
$plot->setColor(new Color(0, 0, 150, 20));
$plot->setFillGradient(
new LinearGradient(
new Color(150, 150, 210),
new Color(245, 245, 245),
0
)
);
$plot->mark->setType(Mark::CIRCLE);
$plot->mark->border->show();
$y = array(
'Lundi',
'Mardi',
'Mercredi',
'Jeudi',
'Vendredi',
'Samedi',
'Dimanche'
);
$plot->xAxis->setLabelText($y);
$plot->xAxis->label->setFont(new Tuffy(7));
$graph->add($plot);
$graph->draw();
?> |
Partager