本文整理匯總了PHP中PiePlot3D::SetColor方法的典型用法代碼示例。如果您正苦於以下問題:PHP PiePlot3D::SetColor方法的具體用法?PHP PiePlot3D::SetColor怎麽用?PHP PiePlot3D::SetColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PiePlot3D
的用法示例。
在下文中一共展示了PiePlot3D::SetColor方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: graficarTorta
function graficarTorta()
{
require 'jpgraph/src/jpgraph.php';
require 'jpgraph/src/jpgraph_pie.php';
require 'jpgraph/src/jpgraph_pie3d.php';
// Some data
$data = array($_GET['pos'], $_GET['neg']);
// Create the Pie Graph.
$graph = new PieGraph(350, 300);
$theme_class = new VividTheme();
$graph->SetTheme($theme_class);
// Set A title for the plot
// $graph->title->Set("Grafico Estadistico");
// Create
$p1 = new PiePlot3D($data);
$p1->ShowBorder();
$p1->SetColor('black');
$p1->ExplodeSlice(1);
$p1->SetLegends(array($_GET['lab1'], $_GET['lab2']));
$p1->SetCenter(0.5, 0.4);
$p1->SetAngle(40);
$graph->Add($p1);
$graph->Stroke();
}
示例2: createPie
function createPie($waktu, $data_pie)
{
require_once '../jpgraph/jpgraph.php';
require_once '../jpgraph/jpgraph_pie.php';
require_once '../jpgraph/jpgraph_pie3d.php';
// Some data
$data = $data_pie;
// Create the Pie Graph.
$graph = new PieGraph(400, 300);
$theme_class = new VividTheme();
$graph->SetTheme($theme_class);
// Set A title for the plot
$graph->title->Set("GRAFIK KEPATUHAN WP");
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
// Create
$p1 = new PiePlot3D($data);
$p1->SetLegends(array('PATUH', 'KURANG PATUH', 'TIDAK PATUH'));
$p1->SetCenter(0.5, 0.45);
$p1->ShowBorder();
$p1->SetColor('black');
$graph->Add($p1);
//unlink('../graphfiles/pie_kepatuhan.png');
$graph->Stroke("../graphfiles/pie_kepatuhan_" . $waktu . ".png");
}