本文整理汇总了PHP中PiePlot3d::ExplodeAll方法的典型用法代码示例。如果您正苦于以下问题:PHP PiePlot3d::ExplodeAll方法的具体用法?PHP PiePlot3d::ExplodeAll怎么用?PHP PiePlot3d::ExplodeAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PiePlot3d
的用法示例。
在下文中一共展示了PiePlot3d::ExplodeAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: piePlot
private function piePlot($question, $datax, $datay, $width, $height)
{
include_once BASE . "jpgraph.php";
include_once BASE . "jpgraph_pie.php";
include_once BASE . "jpgraph_pie3d.php";
// Create the Pie Graph.
$graph = new PieGraph($width, $height, "auto");
$graph->SetShadow();
// Set A title for the plot
$tFontSize = 11;
$graph->title->Set($question);
$graph->title->SetFont(FF_VERDANA, FS_BOLD, $tFontSize);
$graph->title->SetColor("darkblue");
$graph->SetAntiAliasing(true);
$graph->legend->SetPos(0.02, 0.95, 'right', 'bottom');
$graph->legend->SetMarkAbsSize(5);
$graph->legend->SetFont(FF_ARIAL, FS_NORMAL, 9);
$tWidth = $graph->title->GetWidth($graph->img);
//if ($graph->title->GetWidth($graph->img)>$width) $graph->title->SetFont(FF_VERDANA, FS_BOLD, $tFontSize-2);
if ($tWidth > $width) {
$index = strrpos(substr($question, 0, ($len = strlen($question)) / 2 + 5), ' ');
//echo $index;
if ($index === false) {
$index = $len / 2 - 3;
}
$question[$index] = "\n";
$graph->title->SetFont(FF_VERDANA, FS_BOLD, $tFontSize -= 2);
$graph->title->Set($question);
}
// Create pie plot
$pie = new PiePlot3d($datay);
$pie->SetTheme("sand");
$pie->SetCenter(0.5, 0.4);
$pie->SetSize(($t = $height * 0.005 / $this->amountOfVariants) > 0.5 ? 0.5 : $t);
$pie->SetAngle(30);
$pie->ExplodeAll(5);
$pie->value->SetFont(FF_ARIAL, FS_NORMAL, 10);
$pie->SetLegends($datax);
$graph->Add($pie);
return $graph->Stroke("images/raporty/{$this->id_pytanie}P.png");
}