Location: PHPKode > projects > Monyet > plotter/jpgraph-2.2/src/Examples/piecex1.php
// $Id
// Example of pie with center circle
include ("../jpgraph.php");
include ("../jpgraph_pie.php");

// Some data
$data = array(50,28,25,27,31,20);

// A new pie graph
$graph = new PieGraph(300,300,'auto');

// Setup title
$graph->title->Set("Pie plot with center circle");
$graph->title->SetMargin(8); // Add a little bit more margin from the top

// Create the pie plot
$p1 = new PiePlotC($data);

// Set size of pie

// Label font and color setup

// Setup the title on the center circle
$p1->midtitle->Set("Test mid\nRow 1\nRow 2");

// Set color for mid circle

// Use percentage values in the legends values (This is also the default)

// Add plot to pie graph

// .. and send the image on it's marry way to the browser


Return current item: Monyet