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
|
|
@ -1,30 +0,0 @@
|
|||
<?php
|
||||
include ("../jpgraph.php");
|
||||
include ("../jpgraph_bar.php");
|
||||
|
||||
$data = array(0.1235,0.4567,0.67,0.45,0.832);
|
||||
|
||||
// Callback function
|
||||
// Get called with the actual value and should return the
|
||||
// value to be displayed as a string
|
||||
function cbFmtPercentage($aVal) {
|
||||
return sprintf("%.1f%%",100*$aVal); // Convert to string
|
||||
}
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph(400,300);
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Create a bar plots
|
||||
$bar1 = new BarPlot($data);
|
||||
|
||||
// Setup the callback function
|
||||
$bar1->value->SetFormatCallback("cbFmtPercentage");
|
||||
$bar1->value->Show();
|
||||
|
||||
// Add the plot to the graph
|
||||
$graph->Add($bar1);
|
||||
|
||||
// .. and send the graph back to the browser
|
||||
$graph->Stroke();
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue