本文整理汇总了PHP中PiePlot3d::SetLabels方法的典型用法代码示例。如果您正苦于以下问题:PHP PiePlot3d::SetLabels方法的具体用法?PHP PiePlot3d::SetLabels怎么用?PHP PiePlot3d::SetLabels使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PiePlot3d
的用法示例。
在下文中一共展示了PiePlot3d::SetLabels方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pieChart
public static function pieChart($data, $legends)
{
$graph = new PieGraph(900, 550, 'auto');
$graph->SetShadow();
// $graph->title->Set($topic);
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14);
$graph->legend->Pos(0.1, 0.2);
// Creating a 3D pie graphic
$p1 = new PiePlot3d($data);
$p1->SetTheme("sand");
$p1->SetLabels($legends);
$p1->SetLabelPos(1);
$p1->SetLabelType(PIE_VALUE_PER);
$p1->value->Show();
$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 20);
$p1->value->SetColor('darkgray');
$p1->SetCenter(0.45, 0.5);
$p1->SetAngle(45);
$p1->ExplodeAll(20);
// $p1->value->SetFont(FF_ARIAL, FS_NORMAL, 12);
// $p1->SetLegends($legends);
$graph->img->SetImgFormat('png');
$graph->Add($p1);
// Showing graphic
return $graph->Stroke('../graph/3DpieChart.png');
}
示例2:
// Set A title for the plot
$graph->title->Set($title);
$graph->title->SetFont(FF_TIMES, FS_BOLD, 18);
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.03, 0.3);
// Create 3D pie plot
$p1 = new PiePlot3d($data);
$graph->SetShadow();
$p1->SetSliceColors(array('#5CD900', '#6666FF'));
$p1->SetCenter(0.4);
$p1->SetSize(80);
// Adjust projection angle
$p1->SetAngle(45);
// Adjsut angle for first slice
$p1->SetStartAngle(45);
// Display the slice values
$p1->value->SetFont(FF_TIMES, FS_BOLD, 11);
$p1->value->SetColor("navy");
// Add colored edges to the 3D pie
// NOTE: You can't have exploded slices with edges!
$p1->SetEdge("navy");
$p1->SetLabelType(PIE_VALUE_ABS);
$p1->value->SetFormat('$%d');
$p1->SetLabels(array($balance, $total), 1);
$p1->SetLegends(array($label1, $label2));
$graph->Add($p1);
$graph->Stroke();
?>
示例3: elseif
//$graph->title->Set(gettext("EVENTS RECEIVED"));
} elseif ($type == "alarm") {
//$graph->title->Set(gettext("ALARMS RECEIVED"));
}
$graph->title->SetFont(FF_FONT1, FS_BOLD);
// Create pie plot
$p1 = new PiePlot3d($data);
$p1->SetHeight(12);
$p1->SetSize(0.3);
if (count($labels) > 1) {
$p1->SetCenter(0.5, 0.25);
} else {
$p1->SetCenter(0.57, 0.25);
}
$p1->SetLegends($legend);
$p1->SetLabels($labels);
$p1->SetLabelPos(1);
$graph->legend->SetPos(0.5, 0.95, 'center', 'bottom');
$graph->legend->SetShadow('#fafafa', 0);
$graph->legend->SetFrameWeight(0);
$graph->legend->SetFillColor('#fafafa');
$graph->SetFrame(false);
$p1->SetSliceColors($colors);
//$p1->SetStartAngle(M_PI/8);
//$p1->ExplodeSlice(0);
$graph->Add($p1);
$graph->Stroke();
unset($graph);
exit;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">