forked from halo-battle/game
Version 1.12
This commit is contained in:
parent
2a066a7498
commit
de31cd3e9a
1373 changed files with 156282 additions and 45238 deletions
46
onyx2/include/jpgraph/Examples/piecex1.php
Normal file
46
onyx2/include/jpgraph/Examples/piecex1.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?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->SetFont(FF_ARIAL,FS_BOLD,14);
|
||||
$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
|
||||
$p1->SetSize(0.32);
|
||||
|
||||
// Label font and color setup
|
||||
$p1->value->SetFont(FF_ARIAL,FS_BOLD,10);
|
||||
$p1->value->SetColor('black');
|
||||
|
||||
// Setup the title on the center circle
|
||||
$p1->midtitle->Set("Test mid\nRow 1\nRow 2");
|
||||
$p1->midtitle->SetFont(FF_ARIAL,FS_NORMAL,10);
|
||||
|
||||
// Set color for mid circle
|
||||
$p1->SetMidColor('yellow');
|
||||
|
||||
// Use percentage values in the legends values (This is also the default)
|
||||
$p1->SetLabelType(PIE_VALUE_PER);
|
||||
|
||||
// Add plot to pie graph
|
||||
$graph->Add($p1);
|
||||
|
||||
// .. and send the image on it's marry way to the browser
|
||||
$graph->Stroke();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue