src/Service/chartService.php
public function renderPiePlot(&$data, &$xmlArr)
    {
        $id = $xmlArr['ATTRIBUTES']['ID'];
        $field = $xmlArr['ATTRIBUTES']['FIELD'];
        $chartType = $xmlArr['ATTRIBUTES']['CHARTTYPE'];
        $size = $xmlArr['ATTRIBUTES']['SIZE'];
        $center = $xmlArr['ATTRIBUTES']['CENTER'];
        $height = $xmlArr['ATTRIBUTES']['HEIGHT'];
        $angle = $xmlArr['ATTRIBUTES']['ANGLE'];
        $labelPos = $xmlArr['ATTRIBUTES']['LABELPOS'];
        $legendField = $xmlArr['ATTRIBUTES']['LAGENDFIELD'];

        if ($chartType == "Pie")
        {
            $plot = new PiePlot($data);
            $plot->SetLabelPos($labelPos);
        }
        else if ($chartType == "Pie3D")
        {
            $plot = new PiePlot3D($data);
            $plot->SetHeight($height);
            $plot->SetAngle($angle);
        }
        list($c1, $c2) = explode(',', $center);
        $plot->SetCenter($c1,$c2);
        $plot->SetSize($size);

        $this->_drawString($plot->value,$xmlArr['VALUE']['ATTRIBUTES']['FONT'],$xmlArr['VALUE']['ATTRIBUTES']['COLOR']);

        return $plot;
    }
public function renderPiePlot(&$data, &$xmlArr)
    {
        $id = $xmlArr['ATTRIBUTES']['ID'];
        $field = $xmlArr['ATTRIBUTES']['FIELD'];
        $chartType = $xmlArr['ATTRIBUTES']['CHARTTYPE'];
        $size = $xmlArr['ATTRIBUTES']['SIZE'];
        $center = $xmlArr['ATTRIBUTES']['CENTER'];
        $height = $xmlArr['ATTRIBUTES']['HEIGHT'];
        $angle = $xmlArr['ATTRIBUTES']['ANGLE'];
        $labelPos = $xmlArr['ATTRIBUTES']['LABELPOS'];
        $legendField = $xmlArr['ATTRIBUTES']['LAGENDFIELD'];

        if ($chartType == "Pie")
        {
            $plot = new PiePlot($data);
            $plot->SetLabelPos($labelPos);
        }
        else if ($chartType == "Pie3D")
        {
            $plot = new PiePlot3D($data);
            $plot->SetHeight($height);
            $plot->SetAngle($angle);
        }
        list($c1, $c2) = explode(',', $center);
        $plot->SetCenter($c1,$c2);
        $plot->SetSize($size);

        $this->_drawString($plot->value,$xmlArr['VALUE']['ATTRIBUTES']['FONT'],$xmlArr['VALUE']['ATTRIBUTES']['COLOR']);

        return $plot;
    }
chartService::renderPiePlot() - draw the Pie type plot

@param array $data plot data array reference
@param array $xmlArr xml array reference
@return object refernce Pie plot object reference