1<?php // content="text/plain; charset=utf-8"
2require_once '../../vendor/autoload.php';
3\JpGraph\JpGraph::load();
4\JpGraph\JpGraph::module('pie');
5
6$data = array(40, 60, 21, 33);
7
8$graph = new \PieGraph(300, 200);
9$graph->SetShadow();
10
11$graph->title->Set("Example 4 of pie plot");
12$graph->title->SetFont(FF_FONT1, FS_BOLD);
13
14$p1 = new \PiePlot($data);
15$p1->value->SetFont(FF_FONT1, FS_BOLD);
16$p1->value->SetColor("darkred");
17$p1->SetSize(0.3);
18$p1->SetCenter(0.4);
19$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May"));
20$graph->Add($p1);
21
22$graph->Stroke();
23