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
|
<?php
require_once('Artichow/Pie.class.php');
$graph = new Graph(450, 280);
//$graph->shadow->setPosition(Shadow::RIGHT_BOTTOM);
$graph->shadow->setSize(4);
$graph->setBackgroundGradient(
new LinearGradient(
new Color(240, 240, 240, 0),
new White,
0
)
);
$genres = array(
'Action' => 28,
'Policier' => 14,
'Aventure' => 20,
'Romance' => 8,
'Drame' => 3,
'Science-Fiction' => 17,
);
$pie = new Pie(array_values($genres));
$pie->setLabelPrecision(1);
$pie->setLegend(array_keys($genres));
$pie->legend->setPosition(1.45, .25);
$pie->setCenter(.36, .58);
$pie->setSize(.65, .65);
$pie->set3D(5);
$pie->title->set('Popularité pour le mois juin');
$pie->title->move(0, -40);
$pie->title->setFont(new TuffyBold(14));
$pie->title->setBackgroundColor(new White(50));
$pie->title->setPadding(5, 5, 2, 2);
$pie->title->border->setColor(new Black());
$graph->add($pie);
$graph->draw();
?> |
Partager