=2){ include "dyn/var.inc"; for ($i = 1; $i <= $nbrcandidat; $i++) { array_push ($values, $candidats[$i]['voix']); //mo if ($flagzerro==1){ if ($candidats[$i]['voix']>0) { $flagzerro=0; } } array_push ($libleg, $candidats[$i]['nom']); // if ($flag_legende==2){ if ($lib_plot==1){ array_push ($aff, $candidats[$i]['nom']." ".$candidats[$i]['voix']); }else{ if ($lib_plot==2){ array_push ($aff, $candidats[$i]['nom']." ".$candidats[$i]['tx']); }else{ array_push ($aff, $candidats[$i]['nom']); } } } } // if($flagzerro==0){ $graph = new Graph($x_graph,$y_graph); $graph->setAntiAliasing(FALSE); if ($cadre_graph==0){ $graph->border->hide(); } $plot = new Pie($values, $jeux); $plot->setSize($x_cam,$y_cam);//taille du cammenbert 0.85, 0.60 $plot->set3D($h_cam); $plot->setBorderColor(new $couleur_trait_plot);// couleur separtion plot camenbert if ($flag_legende==2){ $plot->label->setCallbackFunction(NULL);//supprime % }else{ $plot->label->hide(TRUE); } if ($flag_legende==2){ $plot->legend->hide(TRUE);//supprime la legende }else{ $plot->setLegend($libleg); $plot->legend->setPosition($x_leg,$y_leg); $plot->legend->shadow->setSize(0); $plot->legend->setBackgroundColor(new VeryLightGray($leg_transparence)); } if ($flag_legende==2){ $plot->label->set($aff); } $graph->add($plot); $graph->draw(); }else{ //resultats a zerro $graph = new Graph($x_graph,$y_graph); $graph->setAntiAliasing(FALSE); if ($cadre_graph==0){ $graph->border->hide(); } $plot = new Pie(array(1), $jeux); $plot->setSize($x_cam,$y_cam);//taille du cammenbert 0.85, 0.60 $plot->set3D($h_cam); $plot->setBorderColor(new $couleur_trait_plot(100));// couleur separtion plot camenbert $plot->label->hide(TRUE); $plot->legend->hide(TRUE); $graph->add($plot); $graph->draw(); } } } } ?>