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
39
onyx2/include/jpgraph/Examples/negbarvalueex01.php
Normal file
39
onyx2/include/jpgraph/Examples/negbarvalueex01.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
include ("../jpgraph.php");
|
||||
include ("../jpgraph_bar.php");
|
||||
|
||||
$datay=array(12,0,-19,-7,17,-6);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph(400,300,"auto");
|
||||
$graph->img->SetMargin(60,30,40,40);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetShadow();
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new BarPlot($datay);
|
||||
$bplot->SetFillColor("orange");
|
||||
|
||||
// DIsplay value at top of each bar
|
||||
$bplot->value->Show();
|
||||
$bplot->SetShadow();
|
||||
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Position the scale at the min of the other axis
|
||||
$graph->xaxis->SetPos("min");
|
||||
|
||||
// Add 10% more space at top and bottom of graph
|
||||
$graph->yscale->SetGrace(10,10);
|
||||
|
||||
$graph->xaxis->title->Set("X-title");
|
||||
$graph->yaxis->title->Set("Y-title");
|
||||
|
||||
$graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);
|
||||
$graph->title->Set("Example of bar plot with absolute labels");
|
||||
|
||||
$graph->yaxis->title->SetFont(FF_ARIAL,FS_NORMAL,16);
|
||||
|
||||
|
||||
$graph->Stroke();
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue