Exemplo n.º 1
0
$p1->SetLabelPos(0.7);
// Set perM  > 1  below to enable per million labels
$perM = 0;
if ($perM < 1) {
    $p1->SetLabelType(PIE_VALUE_ABS);
    $p1->value->SetFormat("%d");
} else {
    $p1->SetLabelType(PIE_VALUE_PER);
    $p1->value->SetFormat(".%dM");
}
// Set percentage to enable per percent labels
$percentage = 1;
if ($percentage > 0) {
    $p1->SetLabelType(PIE_VALUE_ABS);
    $p1->value->SetFormat("%d%%");
    $p1->SetValueType(PIE_VALUE_PERCENTAGE);
}
// Set theme colors
// Options are "earth", "sand", "water" and doodoo, no, I mean "pastel" :-)
$p1->SetTheme("earth");
// Explode all slices
$p1->ExplodeAll($topx);
// Add drop shadow
$aColor = "darkgray";
$p1->SetShadow($aColor);
// Finally add the plot
$graph->Add($p1);
// ... and stroke it
// $graph->Stroke();
//$ih = $graph->Stroke(_IMG_HANDLE);
// $graph->StrokeCSIM("$graph_name");