1<?php // content="text/plain; charset=utf-8"
2require_once '../../vendor/autoload.php';
3use Amenadiel\JpGraph\Graph;
4use Amenadiel\JpGraph\Plot;
5
6// Some data
7$data = array(40, 21, 17, 14, 23);
8
9// Create the Pie Graph.
10$graph = new Graph\PieGraph(300, 200);
11$graph->SetShadow();
12
13// Set A title for the plot
14$graph->title->Set("Example 2 Pie plot");
15$graph->title->SetFont(FF_FONT1, FS_BOLD);
16
17// Create
18$p1 = new Plot\PiePlot($data);
19$p1->SetLegends(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"));
20$graph->Add($p1);
21$graph->Stroke();
22