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
|
<?php
include ("../jpgraph.php");
include ("../jpgraph_pie.php");
$tabRepart=array("5355 ", "3535 ", "6160 ", "1330 ");
$tabLastRepart=array("6970 ", "3145 ", "5260 ", "8490 ");
$tabLegend=array("Label1\n%.1f%%", "Label2\n%.1f%%", "Label3\n%.1f%%", "Label4\n%.1f%%");
$graph = new PieGraph(700,450,'auto');
$graph->title->SetFont(FF_ARIAL, FS_NORMAL);
$graph->title->SetColor("#000000");
$graph->SetFrame(true ,'black',0);
$p1 = new PiePlot($tabRepart);
$p1->SetSize(0.3);
$p1->SetCenter(0.25,0.45);
$p1->SetTheme("earth");
$p1->value->SetFont(FF_ARIAL,FS_NORMAL,9);
$p1->SetLabels($tabLegend);
$p2 = new PiePlot($tabLastRepart);
$p2->SetSize(0.3);
$p2->SetCenter(0.75,0.45);
$p2->SetTheme("earth");
$p2->value->SetFont(FF_ARIAL,FS_NORMAL,9);
$p2->SetLabels($tabLegend);
$graph->Add($p1);
$graph->Add($p2);
$graph->Stroke();
?> |
Partager