} // Set percentage to enable per percent labels $percentage = 1; if ($percentage > 0) { $p1->SetLabelType(PIE_VALUE_ABS); $p1->value->SetFormat("%d%%"); $p1->SetValueType(PIE_VALUE_PERCENTAGE); } // Set theme colors // Options are "earth", "sand", "water" and doodoo, no, I mean "pastel" :-) $p1->SetTheme("earth"); // Explode all slices $p1->ExplodeAll($topx); // Add drop shadow $aColor = "darkgray"; $p1->SetShadow($aColor); // Finally add the plot $graph->Add($p1); // ... and stroke it // $graph->Stroke(); //$ih = $graph->Stroke(_IMG_HANDLE); // $graph->StrokeCSIM("$graph_name"); $graph->Stroke($fileName); // $mapName = 'Top10'; $imgMap = $graph->GetHTMLImageMap($mapName); // die("?offset=".$offset. "PPP" .$ParamsGET); echo "{$imgMap} <TD ALIGN=\"center\"><img src=\"{$fileName}\" alt=\"{$mapName} Graph - Click on slice to drill down\" ismap usemap=\"#{$mapName}\" border=\"0\"></TD></TR>"; require_once 'includes/html_footer.php'; //------------------------------------------------------------------------ // Else just direct the user back to the form //------------------------------------------------------------------------
//$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']); $plot->setTheme($options['graph_pie_theme']); if ($options['graph_plotshadow']) { $plot->SetShadow(); } //$plot->SetStartAngle(M_PI/8); //printr($options['graph_pie_explode_pos']); switch ($options['graph_pie_explode']) { case 'all': $plot->ExplodeAll(10); break; case 'pos': $plot->ExplodeSlice((int) $options['graph_pie_explode_pos']); break; } $graph->Add($plot); } elseif ($options['graph_type'] == 'bars') { require_once "{$jpgraph}/jpgraph_bar.php"; $background = "white";