Rev | Line | |
---|
[42] | 1 | <?php // content="text/plain; charset=utf-8"
|
---|
| 2 | require_once ('jpgraph/jpgraph.php');
|
---|
| 3 | require_once ('jpgraph/jpgraph_pie.php');
|
---|
| 4 |
|
---|
| 5 | // Some data
|
---|
| 6 | $data = array(40,21,17,14,23);
|
---|
| 7 |
|
---|
| 8 | // Create the Pie Graph.
|
---|
| 9 | $graph = new PieGraph(300,200);
|
---|
| 10 | $graph->SetShadow();
|
---|
| 11 |
|
---|
| 12 | // Set A title for the plot
|
---|
| 13 | $graph->title->Set("Example 2 Pie plot");
|
---|
| 14 | $graph->title->SetFont(FF_FONT1,FS_BOLD);
|
---|
| 15 |
|
---|
| 16 | // Create
|
---|
| 17 | $p1 = new PiePlot($data);
|
---|
| 18 | $p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul"));
|
---|
| 19 | $graph->Add($p1);
|
---|
| 20 | $graph->Stroke();
|
---|
| 21 |
|
---|
| 22 | ?>
|
---|
| 23 |
|
---|
| 24 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.