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