本文整理匯總了PHP中PieGraph::ClearTheme方法的典型用法代碼示例。如果您正苦於以下問題:PHP PieGraph::ClearTheme方法的具體用法?PHP PieGraph::ClearTheme怎麽用?PHP PieGraph::ClearTheme使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PieGraph
的用法示例。
在下文中一共展示了PieGraph::ClearTheme方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Query
WHERE id_tournoi = 3';
$query = new Query($database, $sql);
if ($query->execute()) {
$playersTMNF = $query->getResult()[0]['nbr'];
}
$sql = 'SELECT COUNT(*) AS nbr FROM joueurtournoi
WHERE id_tournoi = 5';
$query = new Query($database, $sql);
if ($query->execute()) {
$playersHS = $query->getResult()[0]['nbr'];
}
$total = $playersHOTS + $playersCOD4 + $playersTMNF + $playersHS;
$data = array($playersHOTS / $total * 100, $playersCOD4 / $total * 100, $playersTMNF / $total * 100, $playersHS / $total * 100);
$labels = array("HOTS\n(%.1f%%)", "COD4\n(%.1f%%)", "TMNF\n(%.1f%%)", "HS\n(%.1f%%)");
$graph = new PieGraph(300, 250);
$graph->ClearTheme();
$graph->SetShadow();
$graph->title->Set('Players Games Ratio');
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 11);
$graph->title->SetColor('black');
$p1 = new PiePlot($data);
$graph->Add($p1);
$p1->SetCenter(0.5, 0.5);
$p1->SetSize(0.25);
$p1->ShowBorder();
$p1->value->SetFormat('%d%%');
$p1->SetGuideLines();
$p1->SetGuideLinesAdjust(1.5);
$p1->SetLabels($labels);
$p1->SetLabelPos(1);
$p1->SetLabelType(PIE_VALUE_ADJPERCENTAGE);