本文整理汇总了PHP中PieGraph::SetTitleBackground方法的典型用法代码示例。如果您正苦于以下问题:PHP PieGraph::SetTitleBackground方法的具体用法?PHP PieGraph::SetTitleBackground怎么用?PHP PieGraph::SetTitleBackground使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PieGraph
的用法示例。
在下文中一共展示了PieGraph::SetTitleBackground方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
\JpGraph\JpGraph::module('pie3d');
// Some data
$data = array(40, 60, 21, 33);
$piepos = array(0.2, 0.35, 0.5, 0.25, 0.3, 0.7, 0.85, 0.7);
$titles = array('USA', 'Sweden', 'South America', 'Australia');
$n = count($piepos) / 2;
// A new Graph\Graph
$graph = new \PieGraph(450, 300, 'auto');
$theme_class = "PastelTheme";
$graph->SetTheme(new $theme_class());
// Setup background
$graph->SetBackgroundImage('worldmap1.jpg', BGIMG_FILLFRAME);
// Setup title
$graph->title->Set("Pie plots with background image");
$graph->title->SetColor('white');
$graph->SetTitleBackground('#4169E1', TITLEBKG_STYLE2, TITLEBKG_FRAME_FULL, '#4169E1', 10, 10, true);
$p = array();
// Create the plots
for ($i = 0; $i < $n; ++$i) {
$p[] = new \PiePlot3D($data);
}
for ($i = 0; $i < $n; ++$i) {
$graph->Add($p[$i]);
}
// Position the four pies and change color
for ($i = 0; $i < $n; ++$i) {
$p[$i]->SetCenter($piepos[2 * $i], $piepos[2 * $i + 1]);
$p[$i]->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#DC143C', '#BA55D3'));
}
// Set the titles
for ($i = 0; $i < $n; ++$i) {