本文整理汇总了PHP中PiePlot3D::Explode方法的典型用法代码示例。如果您正苦于以下问题:PHP PiePlot3D::Explode方法的具体用法?PHP PiePlot3D::Explode怎么用?PHP PiePlot3D::Explode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PiePlot3D
的用法示例。
在下文中一共展示了PiePlot3D::Explode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
require_once '../../vendor/autoload.php';
\JpGraph\JpGraph::load();
\JpGraph\JpGraph::module('pie');
\JpGraph\JpGraph::module('pie3d');
// Some data
$data = array(20, 27, 45, 75, 90);
// Create the Pie Graph.
$graph = new \PieGraph(350, 200);
$graph->SetShadow();
// Set A title for the plot
$graph->title->Set("Example 2 3D Pie plot");
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 18);
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.1, 0.2);
// Create 3D pie plot
$p1 = new \PiePlot3D($data);
$p1->SetTheme("sand");
$p1->SetCenter(0.4);
$p1->SetSize(0.4);
$p1->SetHeight(5);
// Adjust projection angle
$p1->SetAngle(45);
// You can explode several slices by specifying the explode
// distance for some slices in an array
$p1->Explode(array(0, 40, 0, 30));
// As a shortcut you can easily explode one numbered slice with
// $p1->ExplodeSlice(3);
$p1->value->SetFont(FF_ARIAL, FS_NORMAL, 10);
$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct"));
$graph->Add($p1);
$graph->Stroke();