Example #1
0
 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);
     }
 }