- //$i index de la couleur (vous venez d'une boucle pour afficher...)
- //$totpartic population globale répondant à la question
- // $t_totanswers population concernée par cette réponse
- function graph_vert($t_totanswers,$totpartic,$i)
- {
- $t_color = array ( // pour les barres de couleurs
- "0" => "hgreen.gif",
- "1" => "hblue.gif",
- "3" => "hbrown.gif",
- "2" => "hgold.gif",
- "4" => "horange.gif ",
- "5" => "hpink.gif ",
- "6" => "hcuivre.gif ",
- "7" => "hgreen.gif ",
- "8" => "hblue.gif",
- "9" => "hbrown.gif",
- "10" => "hgold.gif",
- "11" => "haqua.gif ",
- "12" => "hpink.gif ",
- "13" => "hcuivre.gif ",
- "14" => "hgreen.gif",
- "15" => "hblue.gif",
- "16" => "hbrown.gif",
- "17" => "hgreen.gif",
- "18" => "hblue.gif",
- "19" => "hbrown.gif",
- "20" => "hgold.gif",
- "21" => "horange.gif ",
- "22" => "hpink.gif ",
- "23" => "hcuivre.gif ",
- "24" => "hgreen.gif ",
- "25" => "hblue.gif",
- "26" => "hbrown.gif",
- "27" => "hgold.gif",
- "28" => "haqua.gif ",
- "29" => "hpink.gif ",
- "30" => "hcuivre.gif ",
- "31" => "haqua.gif");
-
- $totanswer = pourcent($t_totanswers,$totpartic);//fonction pour calculer le pourcentage, vous devriez y arriver sans oim ;)
- //echo "<font><i><strong>$prop</strong> : ($t_totanswers / $totpartic)</i></font> <br>"; // label de la réponse
- // affichage d'un graph
- $imgize = (300* $totanswer)/100 ;// gestion de l'échelle du graph
-
- echo"<td width='20'><div align='center'><img src='$t_color[$i]' width='20' height='$imgize' alt='$totanswer %($t_totanswers/$totpartic)'></div></td>";
-
-
-
- }
//$i index de la couleur (vous venez d'une boucle pour afficher...)
//$totpartic population globale répondant à la question
// $t_totanswers population concernée par cette réponse
function graph_vert($t_totanswers,$totpartic,$i)
{
$t_color = array ( // pour les barres de couleurs
"0" => "hgreen.gif",
"1" => "hblue.gif",
"3" => "hbrown.gif",
"2" => "hgold.gif",
"4" => "horange.gif ",
"5" => "hpink.gif ",
"6" => "hcuivre.gif ",
"7" => "hgreen.gif ",
"8" => "hblue.gif",
"9" => "hbrown.gif",
"10" => "hgold.gif",
"11" => "haqua.gif ",
"12" => "hpink.gif ",
"13" => "hcuivre.gif ",
"14" => "hgreen.gif",
"15" => "hblue.gif",
"16" => "hbrown.gif",
"17" => "hgreen.gif",
"18" => "hblue.gif",
"19" => "hbrown.gif",
"20" => "hgold.gif",
"21" => "horange.gif ",
"22" => "hpink.gif ",
"23" => "hcuivre.gif ",
"24" => "hgreen.gif ",
"25" => "hblue.gif",
"26" => "hbrown.gif",
"27" => "hgold.gif",
"28" => "haqua.gif ",
"29" => "hpink.gif ",
"30" => "hcuivre.gif ",
"31" => "haqua.gif");
$totanswer = pourcent($t_totanswers,$totpartic);//fonction pour calculer le pourcentage, vous devriez y arriver sans oim ;)
//echo "<font><i><strong>$prop</strong> : ($t_totanswers / $totpartic)</i></font> <br>"; // label de la réponse
// affichage d'un graph
$imgize = (300* $totanswer)/100 ;// gestion de l'échelle du graph
echo"<td width='20'><div align='center'><img src='$t_color[$i]' width='20' height='$imgize' alt='$totanswer %($t_totanswers/$totpartic)'></div></td>";
}