本文整理汇总了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);