src/Service/chartService.php
public function pieGraphRender(&$bizObj, &$xmlArr)
    {
        include_once (JPGRAPH_DIR.'/jpgraph.php');
        include_once (JPGRAPH_DIR.'/jpgraph_pie.php');
        include_once (JPGRAPH_DIR.'/jpgraph_pie3d.php');

        $graph = new PieGraph($xmlArr["ATTRIBUTES"]["WIDTH"],$xmlArr["ATTRIBUTES"]["HEIGHT"]);
        //$graph->SetAntiAliasing();

        // get the data set - only support one data
        $fields[0] = $xmlArr['DATASET']['DATAPIE']["ATTRIBUTES"]["FIELD"];
        $legendFld = $xmlArr['DATASET']['DATAPIE']["ATTRIBUTES"]["LEGENDFIELD"];

        $recArray = &$this->getPlotData($bizObj, $fields, $legendFld);

        $chartData = $xmlArr['DATASET']['DATAPIE'];
        $plot = $this->renderPiePlot($recArray[$fields[0]], $chartData);
        $plot->SetLegends($recArray[$legendFld]);
        $graph->Add($plot);

        // render titles
        $graph->title->Set($xmlArr['TITLE']['ATTRIBUTES']['CAPTION']);
        $this->_drawString($graph->title,$xmlArr['TITLE']['ATTRIBUTES']['FONT'],$xmlArr['TITLE']['ATTRIBUTES']['COLOR']);

        // render legend
        $this->_drawLegend($graph->legend,$xmlArr['LEGEND']['ATTRIBUTES']['POSITION'],
                $xmlArr['LEGEND']['ATTRIBUTES']['LAYOUT'], $xmlArr['LEGEND']['ATTRIBUTES']['FONT'],
                $xmlArr['LEGEND']['ATTRIBUTES']['COLOR'], $xmlArr['LEGEND']['ATTRIBUTES']['FILLCOLOR']);
        $graph->Stroke();
    }
public function pieGraphRender(&$bizObj, &$xmlArr)
    {
        include_once (JPGRAPH_DIR.'/jpgraph.php');
        include_once (JPGRAPH_DIR.'/jpgraph_pie.php');
        include_once (JPGRAPH_DIR.'/jpgraph_pie3d.php');

        $graph = new PieGraph($xmlArr["ATTRIBUTES"]["WIDTH"],$xmlArr["ATTRIBUTES"]["HEIGHT"]);
        //$graph->SetAntiAliasing();

        // get the data set - only support one data
        $fields[0] = $xmlArr['DATASET']['DATAPIE']["ATTRIBUTES"]["FIELD"];
        $legendFld = $xmlArr['DATASET']['DATAPIE']["ATTRIBUTES"]["LEGENDFIELD"];

        $recArray = &$this->getPlotData($bizObj, $fields, $legendFld);

        $chartData = $xmlArr['DATASET']['DATAPIE'];
        $plot = $this->renderPiePlot($recArray[$fields[0]], $chartData);
        $plot->SetLegends($recArray[$legendFld]);
        $graph->Add($plot);

        // render titles
        $graph->title->Set($xmlArr['TITLE']['ATTRIBUTES']['CAPTION']);
        $this->_drawString($graph->title,$xmlArr['TITLE']['ATTRIBUTES']['FONT'],$xmlArr['TITLE']['ATTRIBUTES']['COLOR']);

        // render legend
        $this->_drawLegend($graph->legend,$xmlArr['LEGEND']['ATTRIBUTES']['POSITION'],
                $xmlArr['LEGEND']['ATTRIBUTES']['LAYOUT'], $xmlArr['LEGEND']['ATTRIBUTES']['FONT'],
                $xmlArr['LEGEND']['ATTRIBUTES']['COLOR'], $xmlArr['LEGEND']['ATTRIBUTES']['FILLCOLOR']);
        $graph->Stroke();
    }
draw the Pie type graph (can have 1 pie plot)

@param BizObj $bizObj object reference of bizobj
@param array $xmlArr xml array reference
@return void