// Setup graph $graph = new PieGraph($width, 250, "auto"); $graph->SetFrame(false); //$graph->SetShadow(); if ($options['graph_pie_antialiasing']) { $graph->SetAntiAliasing(); } // Setup graph title $graph->title->Set($data['title']); $graph->title->SetFont(FF_FONT1, FS_BOLD); // Create pie plot if ($options['graph_pie_3dangle'] == 0) { $plot = new PiePlot($data['values']); } else { $plot = new PiePlot3D($data['values']); $plot->setAngle($options['graph_pie_3dangle']); } //$plot->SetFont(FF_VERDANA,FS_BOLD); //$plot->SetFontColor("darkred"); $plot->SetSize(0.3); $plot->setCenter($options['graph_pie_center']); if (count($data['legend'] > 10)) { $i = 0; foreach ($data['legend'] as $key => $val) { if ($i > 10) { unset($data['legend'][$key]); } $i++; } } $plot->SetLegends($data['legend']);