Salut,
Voici une piste, mais c'est un simple exemple il est possible de faire beaucoup mieux
<?php
/*
* Création de l'image
*/
$image = imagecreatetruecolor(400, 400);
$black = imagecolorallocate($image, 0, 0, 0);
/*
* On rend l'arrière-plan transparent.
*/
imagecolortransparent($image, $black);
/*
* Création des couleurs.
*/
$vert = imagecolorallocate($image, 0x00, 0xFF, 0x40); //Oui.
$rouge = imagecolorallocate($image, 0xFF, 0x00, 0x00); //Non.
$orange = imagecolorallocate($image, 0xFF, 0x80, 0x00); //Null.
/*
* Récup des données des députés.
*/
$d1 = $vert;
$d2 = $rouge;
$d3 = $orange;
$d4 = $orange;
$d5 = $vert;
$d6 = $orange;
$d7 = $rouge;
$d8 = $orange;
$d9 = $vert;
$d10 = $orange;
$d11 = $rouge;
$d12 = $orange;
$d13 = $orange;
$d14 = $rouge;
$d15 = $orange;
/*
* Création des cartiers.
*/
imagefilledarc($image, 200, 200, 400, 400, 180, 0, $d1, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 192, 0, $d2, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 204, 0, $d3, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 216, 0, $d4, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 228, 0, $d5, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 240, 0, $d6, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 252, 0, $d7, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 264, 0, $d8, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 276, 0, $d9, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 288, 0, $d10, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 300, 0, $d11, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 312, 0, $d12, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 324, 0, $d14, IMG_ARC_PIE);
imagefilledarc($image, 200, 200, 400, 400, 336, 0, $d15, IMG_ARC_PIE);
/*
* Affichage de l'image.
*/
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>
La doc est ici