18,11 → 18,10 |
private $chemin_lib_graph = ''; |
|
public function __construct() { |
|
$this->chemin_lib_graph = Config::get('chemin_jpgraph'); |
} |
|
public function genererGraphique($type_graphique, $valeurs, $titre = '', $taille = array(800, 800), $nom_axe_x = '', $nom_axe_y = '') { |
public function genererGraphique($type_graphique, $valeurs, $titre = '', $taille = array(800, 800), $nom_axe_x = '', $nom_axe_y = '') { |
include_once $this->chemin_lib_graph.'jpgraph.php'; |
|
$graph = null; |
44,7 → 43,7 |
include_once $this->chemin_lib_graph.'jpgraph_pie.php'; |
$legendes = array_keys($valeurs); |
$valeurs = array_values($valeurs); |
|
|
$oPie = new PiePlot($valeurs); |
$oPie->SetLegends($legendes); |
// position du graphique (légèrement à droite) |
135,7 → 134,7 |
//$xpos3=3;$ypos3=1000; |
$mgraph->Add($graph1,$xpos1,$ypos1); |
$mgraph->Add($graph2,$xpos2,$ypos2); |
$mgraph->SetShadow(); |
//$mgraph->SetShadow(); |
//$mgraph->Add($graph['experience_bota'],$xpos3,$ypos3); |
return $mgraph; |
} |