Exemplo n.º 1
0
function getItemCarac($item)
{
    // Tableau contenant la correspondance id <=> Nom Taniere
    $tanieres = array("38965" => "La Bïblyohtek", "1646554" => "Le Relais des Abysses", "34111" => "La Taverne");
    return spanColor("gold", strtr(utf8_decode($item->getAttribute("idTaniere")), $tanieres)) . " " . spanColor("silver", "[" . $item->getAttribute("id") . "]") . " " . utf8_decode(addColors($item->getAttribute("carac") . " | " . $item->getAttribute("temps"))) . spanColor("orange", "min");
}
Exemplo n.º 2
0
    $count = 0;
    foreach ($breakdown as $type => $data) {
        $labels[] = $type;
        // see if we are on a new category
        $category = strtok($type, '/');
        if (strcasecmp($category, $lastType)) {
            if (strlen($lastType)) {
                addColors($colors, $lastType, $count);
            }
            // reset the counter
            $count = 0;
            $lastType = $category;
        }
        $count++;
    }
    if (strlen($lastType)) {
        addColors($colors, $lastType, $count);
    }
    // set  the actual labels for the wedges
    $pie->SetLabels($labels, 1.1);
    if (count($colors)) {
        $pie->SetSliceColors($colors);
    }
    // set other options
    $pie->SetGuideLines(true, true, true);
    $graph->title->SetFont(FF_FONT2, FS_BOLD);
    $graph->title->Set($chartType);
    $pie->ShowBorder(true, true);
    $graph->Add($pie);
    $graph->Stroke();
}