本文整理汇总了PHP中RadarPlot::setBackgroundColor方法的典型用法代码示例。如果您正苦于以下问题:PHP RadarPlot::setBackgroundColor方法的具体用法?PHP RadarPlot::setBackgroundColor怎么用?PHP RadarPlot::setBackgroundColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RadarPlot
的用法示例。
在下文中一共展示了RadarPlot::setBackgroundColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _renderPlotRadar
private function _renderPlotRadar($groupID)
{
$radarStyle = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle();
$seriesCount = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount();
$seriesPlots = array();
// Loop through each data series in turn
for ($i = 0; $i < $seriesCount; ++$i) {
$dataValuesY = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues();
$dataValuesX = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues();
$marker = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker();
$dataValues = array();
foreach ($dataValuesY as $k => $dataValueY) {
$dataValues[$k] = implode(' ', array_reverse($dataValueY));
}
$tmp = array_shift($dataValues);
$dataValues[] = $tmp;
$tmp = array_shift($dataValuesX);
$dataValuesX[] = $tmp;
$this->_graph->SetTitles(array_reverse($dataValues));
$seriesPlot = new RadarPlot(array_reverse($dataValuesX));
$dataLabel = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue();
$seriesPlot->setBackgroundColor(self::$_colourSet[self::$_plotColour++]);
if ($radarStyle == 'filled') {
$seriesPlot->SetFillColor(self::$_colourSet[self::$_plotColour]);
}
$this->_formatPointMarker($seriesPlot, $marker);
$seriesPlot->SetLegend($dataLabel);
$this->_graph->Add($seriesPlot);
}
}