42,10 → 42,14 |
public function genererGraphiqueCamembert($valeurs, $titre) { |
|
include_once("lib/jpgraph_pie.php"); |
$graph = new PieGraph(500,500); |
$graph = new PieGraph(800,500); |
|
$legendes = array_keys($valeurs); |
|
$valeurs = array_values($valeurs); |
|
$oPie = new PiePlot(array_values($valeurs)); |
$oPie->SetLegends(array_keys($valeurs)); |
$oPie = new PiePlot($valeurs); |
$oPie->SetLegends($legendes); |
|
// Ajouter le titre du graphique |
$graph->title->Set($titre); |
56,10 → 60,10 |
$oPie->SetValueType(PIE_VALUE_PER); |
|
// Format des valeurs de type "entier" |
$oPie->value->SetFormat('%d'); |
$oPie->value->SetFormat('%1.2f%%'); |
|
$graph->Add($oPie); |
return $graph/*->Stroke(_IMG_HANDLER)*/; |
return $graph->Stroke(_IMG_HANDLER); |
} |
|
public function genererGraphiqueCourbe($valeurs, $titre, $nom_axe_x, $nom_axe_y) { |
67,7 → 71,7 |
include_once("lib/jpgraph_line.php"); |
|
// Création du conteneur |
$graph = new Graph(500,500); |
$graph = new Graph(800,500); |
|
// Fixer les marges |
$graph->img->SetMargin(40,30,50,40); |
119,7 → 123,7 |
// Ajouter la courbe au conteneur |
$graph->Add($courbe); |
|
return $graph/*->Stroke(_IMG_HANDLER)*/; |
return $graph->Stroke(_IMG_HANDLER); |
} |
|
public function combinerGraphiques($graph) { |
132,7 → 136,7 |
$mgraph->Add($graph['pays'],$xpos1,$ypos1); |
$mgraph->Add($graph['activite_bota'],$xpos2,$ypos2); |
$mgraph->Add($graph['experience_bota'],$xpos3,$ypos3); |
return $mgraph->Stroke(_IMG_HANDLER); |
//return $mgraph->Stroke(_IMG_HANDLER); |
} |
|
} |