<?php
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_pie.php');
$data = array(50,28,25,27,31,20);
$graph = new PieGraph(300,300,'auto');
$graph->title->Set("Pie plot with center circle");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,14);
$graph->title->SetMargin(8);
$p1 = new PiePlotC($data);
$p1->SetSize(0.32);
$p1->value->SetFont(FF_ARIAL,FS_BOLD,10);
$p1->value->SetColor('black');
$p1->midtitle->Set("Test mid\nRow 1\nRow 2");
$p1->midtitle->SetFont(FF_ARIAL,FS_NORMAL,10);
$p1->SetMidColor('yellow');
$p1->SetLabelType(PIE_VALUE_PER);
$graph->Add($p1);
$graph->Stroke();
?> |