mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove dependencies from the repository, update install docs (#6920)
After vendor is un-indexed restore the contents so things keep working.
This commit is contained in:
@@ -38,41 +38,23 @@ class ComposerHelper
|
||||
echo "If you don't know what to do, run: composer install\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$event->isDevMode()) {
|
||||
$vendor_dir = $event->getComposer()->getConfig()->get('vendor-dir');
|
||||
public static function preInstall(Event $event)
|
||||
{
|
||||
$vendor_dir = $event->getComposer()->getConfig()->get('vendor-dir');
|
||||
|
||||
if (!is_file("$vendor_dir/autoload.php")) {
|
||||
// checkout vendor from 1.36
|
||||
$cmds = array(
|
||||
"git checkout $vendor_dir",
|
||||
"git clean -x -d -f $vendor_dir"
|
||||
"git checkout 609676a9f8d72da081c61f82967e1d16defc0c4e -- $vendor_dir",
|
||||
"git reset HEAD $vendor_dir" // don't add vendor directory to the index
|
||||
);
|
||||
|
||||
self::exec($cmds);
|
||||
}
|
||||
}
|
||||
|
||||
public static function postAutoloadDump(Event $event)
|
||||
{
|
||||
$vendor_dir = $event->getComposer()->getConfig()->get('vendor-dir');
|
||||
|
||||
$no = $event->isDevMode() ? '' : 'no-';
|
||||
$cmd = "git ls-files -z $vendor_dir | xargs -0 git update-index --{$no}assume-unchanged";
|
||||
|
||||
self::exec($cmd);
|
||||
}
|
||||
|
||||
public static function commit(Event $event)
|
||||
{
|
||||
$vendor_dir = $event->getComposer()->getConfig()->get('vendor-dir');
|
||||
$composer_json_path = $event->getComposer()->getConfig()->getConfigSource()->getName();
|
||||
$cmds = array(
|
||||
"git add -f $vendor_dir $composer_json_path",
|
||||
"git commit"
|
||||
);
|
||||
|
||||
self::exec($cmds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run a command or array of commands and echo the command and output
|
||||
*
|
||||
|
||||
+1
-2
@@ -49,7 +49,6 @@
|
||||
},
|
||||
"scripts": {
|
||||
"pre-update-cmd": "LibreNMS\\ComposerHelper::preUpdate",
|
||||
"post-autoload-dump": "LibreNMS\\ComposerHelper::postAutoloadDump",
|
||||
"commit": "LibreNMS\\ComposerHelper::commit"
|
||||
"pre-install-cmd": "LibreNMS\\ComposerHelper::preInstall"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,6 +227,8 @@ main () {
|
||||
status_run 'Cleaning up DB' "$DAILY_SCRIPT cleanup"
|
||||
;;
|
||||
post-pull)
|
||||
status_run 'Updating Composer packages' "${COMPOSER} install --no-dev" 'update'
|
||||
|
||||
# Check if we need to revert (Must be in post pull so we can update it)
|
||||
if [[ "$old_version" != "$new_version" ]]; then
|
||||
check_php_ver # check php version and switch branches
|
||||
|
||||
@@ -19,7 +19,7 @@ source: Installation/Installation-CentOS-7-Apache.md
|
||||
#### Install LibreNMS
|
||||
|
||||
cd /opt
|
||||
git clone https://github.com/librenms/librenms.git librenms
|
||||
composer create-project --no-dev --keep-vcs librenms/librenms librenms dev-master
|
||||
|
||||
## DB Server ##
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ source: Installation/Installation-CentOS-7-Nginx.md
|
||||
#### Install LibreNMS
|
||||
|
||||
cd /opt
|
||||
git clone https://github.com/librenms/librenms.git librenms
|
||||
composer create-project --no-dev --keep-vcs librenms/librenms librenms dev-master
|
||||
|
||||
## DB Server ##
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ source: Installation/Installation-Ubuntu-1604-Apache.md
|
||||
#### Install LibreNMS
|
||||
|
||||
cd /opt
|
||||
git clone https://github.com/librenms/librenms.git librenms
|
||||
composer create-project --no-dev --keep-vcs librenms/librenms librenms dev-master
|
||||
|
||||
|
||||
## DB Server ##
|
||||
|
||||
@@ -15,8 +15,7 @@ source: Installation/Installation-Ubuntu-1604-Nginx.md
|
||||
#### Install LibreNMS
|
||||
|
||||
cd /opt
|
||||
git clone https://github.com/librenms/librenms.git librenms
|
||||
|
||||
composer create-project --no-dev --keep-vcs librenms/librenms librenms dev-master
|
||||
|
||||
## DB Server ##
|
||||
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
engines:
|
||||
fixme:
|
||||
enabled: true
|
||||
config:
|
||||
strings:
|
||||
- FIXME
|
||||
- BUG
|
||||
- TODO
|
||||
phpcodesniffer:
|
||||
enabled: true
|
||||
config:
|
||||
standard: "PSR1,PSR2"
|
||||
phpmd:
|
||||
enabled: true
|
||||
config:
|
||||
file_extensions: "php"
|
||||
rulesets: "unusedcode,codesize,naming,design,cleancode"
|
||||
duplication:
|
||||
enabled: true
|
||||
config:
|
||||
languages:
|
||||
- php
|
||||
- javascript
|
||||
ratings:
|
||||
paths:
|
||||
- "src/**.php"
|
||||
exclude_paths:
|
||||
- Examples/
|
||||
@@ -1,8 +0,0 @@
|
||||
*bak*
|
||||
|
||||
*sublime*
|
||||
|
||||
|
||||
vendor
|
||||
fabfile*
|
||||
.php.tools.ini
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
filter:
|
||||
excluded_paths:
|
||||
- './Examples/*'
|
||||
|
||||
build:
|
||||
environment:
|
||||
php: '7.1'
|
||||
|
||||
tests: true
|
||||
|
||||
checks:
|
||||
php:
|
||||
code_rating: true
|
||||
duplication: true
|
||||
fix_php_opening_tag: true
|
||||
remove_php_closing_tag: true
|
||||
no_mixed_inline_html: true
|
||||
require_braces_around_control_structures: true
|
||||
psr2_control_structure_declaration: true
|
||||
avoid_superglobals: false
|
||||
security_vulnerabilities: true
|
||||
no_exit: true
|
||||
|
||||
filter: { }
|
||||
coding_style:
|
||||
php:
|
||||
spaces:
|
||||
around_operators:
|
||||
concatenation: true
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// Antispam example using a random string
|
||||
require_once "jpgraph/jpgraph_antispam.php";
|
||||
|
||||
// Create new anti-spam challenge creator
|
||||
// Note: Neither '0' (digit) or 'O' (letter) can be used to avoid confusion
|
||||
$spam = new AntiSpam();
|
||||
|
||||
// Create a random 5 char challenge and return the string generated
|
||||
$chars = $spam->Rand(5);
|
||||
|
||||
// Stroke random cahllenge
|
||||
if ($spam->Stroke() === false) {
|
||||
die('Illegal or no data to plot');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,62 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
require_once 'jpgraph/jpgraph_plotline.php';
|
||||
|
||||
$datay1 = array(2, 6, 7, 12, 13, 18);
|
||||
$datay2 = array(5, 12, 12, 19, 25, 20);
|
||||
|
||||
// Setup the graph
|
||||
$graph = new Graph\Graph(350, 200);
|
||||
$graph->SetMargin(30, 20, 60, 20);
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->SetScale("linlin");
|
||||
|
||||
// Hide the frame around the graph
|
||||
$graph->SetFrame(false);
|
||||
|
||||
// Setup title
|
||||
$graph->title->Set("Using Builtin PlotMarks");
|
||||
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14);
|
||||
|
||||
// Note: requires jpgraph 1.12p or higher
|
||||
// $graph->SetBackgroundGradient('blue','navy:0.5',GRAD_HOR,BGRAD_PLOT);
|
||||
$graph->tabtitle->Set('Region 1');
|
||||
$graph->tabtitle->SetWidth(TABTITLE_WIDTHFULL);
|
||||
|
||||
// Enable X and Y Grid
|
||||
$graph->xgrid->Show();
|
||||
$graph->xgrid->SetColor('[email protected]');
|
||||
$graph->ygrid->SetColor('[email protected]');
|
||||
|
||||
// Format the legend box
|
||||
$graph->legend->SetColor('navy');
|
||||
$graph->legend->SetFillColor('lightgreen');
|
||||
$graph->legend->SetLineWeight(1);
|
||||
$graph->legend->SetFont(FF_ARIAL, FS_BOLD, 8);
|
||||
$graph->legend->SetShadow('[email protected]', 3);
|
||||
$graph->legend->SetAbsPos(15, 120, 'right', 'bottom');
|
||||
|
||||
// Create the line plots
|
||||
|
||||
$p1 = new Plot\LinePlot($datay1);
|
||||
$p1->SetColor("red");
|
||||
$p1->SetFillColor("[email protected]");
|
||||
$p1->SetWeight(2);
|
||||
$p1->mark->SetType(MARK_IMG_DIAMOND, 5, 0.6);
|
||||
$p1->SetLegend('2006');
|
||||
$graph->Add($p1);
|
||||
|
||||
$p2 = new Plot\LinePlot($datay2);
|
||||
$p2->SetColor("darkgreen");
|
||||
$p2->SetWeight(2);
|
||||
$p2->SetLegend('2001');
|
||||
$p2->mark->SetType(MARK_IMG_MBALL, 'red');
|
||||
$graph->Add($p2);
|
||||
|
||||
// Add a vertical line at the end scale position '7'
|
||||
$l1 = new PlotLine(VERTICAL, 7);
|
||||
$graph->Add($l1);
|
||||
|
||||
// Output the graph
|
||||
$graph->Stroke();
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
$im = @imagecreate(200, 100) or die("cannot create a new gd image.");
|
||||
$background_color = imagecolorallocate($im, 240, 240, 240);
|
||||
$border_color = imagecolorallocate($im, 50, 50, 50);
|
||||
$text_color = imagecolorallocate($im, 233, 14, 91);
|
||||
|
||||
imagerectangle($im, 0, 0, 199, 99, $border_color);
|
||||
imagestring($im, 5, 10, 40, "a simple text string", $text_color);
|
||||
header("content-type: image/png");
|
||||
imagepng($im);
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
$im = imagecreatetruecolor(300, 200);
|
||||
$black = imagecolorallocate($im, 0, 0, 0);
|
||||
$lightgray = imagecolorallocate($im, 230, 230, 230);
|
||||
$darkgreen = imagecolorallocate($im, 80, 140, 80);
|
||||
$white = imagecolorallocate($im, 255, 255, 255);
|
||||
|
||||
imagefilledrectangle($im, 0, 0, 299, 199, $lightgray);
|
||||
imagerectangle($im, 0, 0, 299, 199, $black);
|
||||
imagefilledellipse($im, 150, 100, 210, 110, $white);
|
||||
imagefilledellipse($im, 150, 100, 200, 100, $darkgreen);
|
||||
header("Content-type: image/png");
|
||||
imagepng($im);
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// Change this defines to where Your fonts are stored
|
||||
DEFINE("TTF_DIR", "/usr/share/fonts/truetype/");
|
||||
|
||||
// Change this define to a font file that You know that You have
|
||||
DEFINE("TTF_FONTFILE", "arial.ttf");
|
||||
|
||||
// Text to display
|
||||
DEFINE("TTF_TEXT", "Hello World!");
|
||||
|
||||
$im = imagecreatetruecolor(400, 100);
|
||||
$white = imagecolorallocate($im, 255, 255, 255);
|
||||
$black = imagecolorallocate($im, 0, 0, 0);
|
||||
$border_color = imagecolorallocate($im, 50, 50, 50);
|
||||
|
||||
imagefilledrectangle($im, 0, 0, 399, 99, $white);
|
||||
imagerectangle($im, 0, 0, 399, 99, $border_color);
|
||||
imagettftext($im, 30, 0, 90, 60, $black, TTF_DIR.TTF_FONTFILE, TTF_TEXT);
|
||||
|
||||
header("Content-type: image/png");
|
||||
imagepng($im);
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 39 KiB |
-133
@@ -1,133 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once('../jpgraph.php');
|
||||
require_once('../jpgraph_canvas.php');
|
||||
require_once('../jpgraph_colormap.inc.php');
|
||||
|
||||
class ColorMapDriver
|
||||
{
|
||||
const WIDTH = 600; // Image width
|
||||
const LMARG = 90; // Left margin
|
||||
const RMARG = 25; // Right margin
|
||||
const MAPMARG = 35; // Map margin between each map
|
||||
const MODHEIGHT = 30; // Module height (=Map height)
|
||||
const YSTART = 60; // Start coordinate for map list
|
||||
|
||||
public function Draw($aTitle, $aStart, $aEnd, $n=64, $aReverse=false, $addColorNames = false)
|
||||
{
|
||||
|
||||
// Setup to draw colormap with names platoe colors
|
||||
$lmarg = ColorMapDriver::LMARG; // left margin
|
||||
$rmarg = ColorMapDriver::RMARG; // right margin
|
||||
$width = ColorMapDriver::WIDTH; // Overall image width
|
||||
|
||||
// Module height
|
||||
$mh = ColorMapDriver::MODHEIGHT;
|
||||
|
||||
// Step between each map
|
||||
$ymarg = $mh + ColorMapDriver::MAPMARG;
|
||||
|
||||
if ($addColorNames) {
|
||||
$ymarg += 50;
|
||||
}
|
||||
|
||||
// Start position
|
||||
$xs=$lmarg;
|
||||
$ys=ColorMapDriver::YSTART;
|
||||
|
||||
// Setup a basic canvas graph
|
||||
$height = ($aEnd - $aStart + 1) * $ymarg + 50;
|
||||
$graph = new CanvasGraph($width, $height);
|
||||
$graph->img->SetColor('darkgray');
|
||||
$graph->img->Rectangle(0, 0, $width - 1, $height - 1);
|
||||
|
||||
$t = new Text($aTitle, $width / 2, 5);
|
||||
$t->SetAlign('center', 'top');
|
||||
$t->SetFont(FF_ARIAL, FS_BOLD, 14);
|
||||
$t->Stroke($graph->img);
|
||||
|
||||
// Instantiate a colormap
|
||||
$cm = new ColorMap();
|
||||
$cm->InitRGB($graph->img->rgb);
|
||||
|
||||
for ($mapidx=$aStart; $mapidx <= $aEnd; ++$mapidx, $ys += $ymarg) {
|
||||
$cm->SetMap($mapidx, $aReverse);
|
||||
$n = $cm->SetNumColors($n);
|
||||
list($mapidx, $maparray) = $cm->GetCurrMap();
|
||||
$ncols = count($maparray);
|
||||
$colbuckets = $cm->GetBuckets();
|
||||
|
||||
// The module width will depend on the actual number of colors
|
||||
$mw = round(($width - $lmarg - $rmarg) / $n);
|
||||
|
||||
// Draw color map title (name)
|
||||
$t->Set('Basic colors: '.$ncols.', Total colors: '.$n);
|
||||
$t->SetAlign('center', 'bottom');
|
||||
$t->SetAngle(0);
|
||||
$t->SetFont(FF_TIMES, FS_NORMAL, 14);
|
||||
$t->Stroke($graph->img, $width / 2, $ys - 3);
|
||||
|
||||
// Add the name/number of the map to the left
|
||||
$t->SetAlign('right', 'center');
|
||||
$t->Set('Map: '.$mapidx);
|
||||
$t->SetFont(FF_ARIAL, FS_NORMAL, 14);
|
||||
$t->Stroke($graph->img, $xs - 20, round($ys + $mh / 2));
|
||||
|
||||
// Setup text properties for the color names
|
||||
if ($addColorNames) {
|
||||
$t->SetAngle(30);
|
||||
$t->SetFont(FF_ARIAL, FS_NORMAL, 12);
|
||||
$t->SetAlign('right', 'top');
|
||||
}
|
||||
|
||||
// Loop through all colors in the map
|
||||
$x = $xs;
|
||||
$y = $ys;
|
||||
$k =0;
|
||||
for ($i=0; $i < $n; ++$i) {
|
||||
$graph->img->SetColor($colbuckets[$i]);
|
||||
$graph->img->FilledRectangle($x, $y, $x + $mw, $y + $mh);
|
||||
|
||||
// Mark all basic colors in the map with a bar and name
|
||||
if ($i % (($n - $ncols) / ($ncols - 1) + 1) == 0) {
|
||||
$graph->img->SetColor('black');
|
||||
$graph->img->FilledRectangle($x, $y + $mh + 4, $x + $mw - 1, $y + $mh + 6);
|
||||
if ($addColorNames) {
|
||||
$t->Set($maparray[$k++]);
|
||||
$t->Stroke($graph->img, $x + $mw / 2, $y + $mh + 10);
|
||||
}
|
||||
}
|
||||
$x += $mw;
|
||||
}
|
||||
|
||||
// Draw a border around the map
|
||||
$graph->img->SetColor('black');
|
||||
$graph->img->Rectangle($xs, $ys, $xs + $mw * $n, $ys + $mh);
|
||||
}
|
||||
|
||||
// Send back to client
|
||||
$graph->Stroke();
|
||||
}
|
||||
}
|
||||
|
||||
$driver = new ColorMapDriver();
|
||||
|
||||
$title = "Standard maps";
|
||||
$reverse = false;
|
||||
$n = 64; $s =0; $e =9;
|
||||
$showNames = false;
|
||||
|
||||
|
||||
/*
|
||||
$title = "Center maps";
|
||||
$reverse = false;
|
||||
$n = 64; $s=10; $e=14;
|
||||
$showNames = false;
|
||||
*/
|
||||
|
||||
/*
|
||||
$title = "Continues maps";
|
||||
$reverse = false;
|
||||
$n = 64; $s=15; $e=21;
|
||||
$showNames = false;
|
||||
*/
|
||||
$driver->Draw($title, $s, $e, $n, $reverse, $showNames);
|
||||
@@ -1,60 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
$_graphfilename = 'csim_in_html_graph_ex1.php';
|
||||
// This is the filename of this HTML file
|
||||
global $_wrapperfilename;
|
||||
$_wrapperfilename = basename(__FILE__);
|
||||
|
||||
// Create a random mapname used to connect the image map with the image
|
||||
$_mapname = '__mapname'.rand(0, 1000000).'__';
|
||||
|
||||
// This is the first graph script
|
||||
require_once($_graphfilename);
|
||||
|
||||
// This line gets the image map and inserts it on the page
|
||||
$imgmap = $graph->GetHTMLImageMap($_mapname);
|
||||
echo $imgmap;
|
||||
|
||||
?>
|
||||
|
||||
<h2>This is an example page with CSIM graphs with arbitrary HTML text</h2>
|
||||
|
||||
<?php
|
||||
if (empty($_GET['clickedon'])) {
|
||||
echo '<b style="color:darkred;">Clicked on bar: <none></b>';
|
||||
} else {
|
||||
echo '<b style="color:darkred;">Clicked on bar: '.$_GET['clickedon'].'</b>';
|
||||
}
|
||||
echo '<p />';
|
||||
?>
|
||||
|
||||
<p>First we need to get hold of the image map and include it in the HTML
|
||||
page.</p>
|
||||
<p>For this graph it is:</p>
|
||||
<?php
|
||||
|
||||
// The we display the image map as well
|
||||
echo '<pre><b>'.htmlentities($imgmap).'</b></pre>';?>
|
||||
|
||||
<?php
|
||||
// Construct the <img> tag and rebuild the
|
||||
$imgtag = $graph->GetCSIMImgHTML($_mapname, $_graphfilename);
|
||||
?>
|
||||
<p>The graph is then be displayed as shown in figure 1. With the following
|
||||
created <img> tag:</p>
|
||||
<pre><b>
|
||||
<?php echo htmlentities($imgtag); ?>
|
||||
</b></pre>
|
||||
|
||||
|
||||
<p>
|
||||
<?php
|
||||
echo $imgtag;
|
||||
?>
|
||||
<br><b>Figure 1. </b>The included CSIM graph.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,98 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
// The names of the graph scripts
|
||||
$_graphfilename1 = 'csim_in_html_graph_ex1.php';
|
||||
$_graphfilename2 = 'csim_in_html_graph_ex2.php';
|
||||
|
||||
// This is the filename of this HTML file
|
||||
global $_wrapperfilename;
|
||||
$_wrapperfilename = basename(__FILE__);
|
||||
|
||||
// Create a random mapname used to connect the image map with the image
|
||||
$_mapname1 = '__mapname'.rand(0, 1000000).'__';
|
||||
$_mapname2 = '__mapname'.rand(0, 1000000).'__';
|
||||
|
||||
// Get the graph scripts
|
||||
require_once($_graphfilename1);
|
||||
require_once($_graphfilename2);
|
||||
|
||||
// This line gets the image map and inserts it on the page
|
||||
$imgmap1 = $graph->GetHTMLImageMap($_mapname1);
|
||||
$imgmap2 = $piegraph->GetHTMLImageMap($_mapname2);
|
||||
echo $imgmap1;
|
||||
echo $imgmap2;
|
||||
|
||||
?>
|
||||
|
||||
<h2>This is an example page with CSIM graphs with arbitrary HTML text</h2>
|
||||
|
||||
<?php
|
||||
if (empty($_GET['clickedon'])) {
|
||||
echo '<b style="color:darkred;">Clicked on bar: <none></b>';
|
||||
} else {
|
||||
echo '<b style="color:darkred;">Clicked on bar: '.$_GET['clickedon'].'</b>';
|
||||
}
|
||||
echo '<p />';
|
||||
if (empty($_GET['pie_clickedon'])) {
|
||||
echo '<b style="color:darkred;">Clicked on pie slice: <none></b>';
|
||||
} else {
|
||||
echo '<b style="color:darkred;">Clicked on pie slice: '.$_GET['pie_clickedon'].'</b>';
|
||||
}
|
||||
echo '<p />';
|
||||
?>
|
||||
|
||||
<p>First we need to get hold of the image maps and include them in the HTML
|
||||
page.</p>
|
||||
<p>For these graphs the maps are:</p>
|
||||
<?php
|
||||
// The we display the image map as well
|
||||
echo '<small><pre>'.htmlentities($imgmap1).'</pre></small>';
|
||||
?>
|
||||
<p>
|
||||
and
|
||||
</p>
|
||||
<?php
|
||||
// The we display the image map as well
|
||||
echo '<small><pre>'.htmlentities($imgmap2).'</pre></small>';
|
||||
?>
|
||||
|
||||
<?php
|
||||
// Construct the <img> tags for Figure 1 & 2 and rebuild the URL arguments
|
||||
$imgtag1 = $graph->GetCSIMImgHTML($_mapname1, $_graphfilename1);
|
||||
$imgtag2 = $piegraph->GetCSIMImgHTML($_mapname2, $_graphfilename2);
|
||||
?>
|
||||
<p>The graphs are then displayed as shown in figure 1 & 2. With the following
|
||||
created <img> tags:</p>
|
||||
<small><pre>
|
||||
<?php
|
||||
echo htmlentities($imgtag1);
|
||||
echo htmlentities($imgtag2);
|
||||
?>
|
||||
</pre></small>
|
||||
|
||||
<p>
|
||||
Note: For the Pie the center is counted as the first slice.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<table border=0>
|
||||
<tr><td valign="bottom">
|
||||
<?php
|
||||
echo $imgtag1;
|
||||
?>
|
||||
<br><b>Figure 1. </b>The included Bar CSIM graph.
|
||||
</p>
|
||||
</td>
|
||||
<td valign="bottom">
|
||||
<?php
|
||||
echo $imgtag2;
|
||||
?>
|
||||
<br><b>Figure 2. </b>The included Pie CSIM graph.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,46 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../jpgraph.php';
|
||||
require_once '../jpgraph_bar.php';
|
||||
|
||||
$datay = array(12, 26, 9, 17, 31);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(400, 250);
|
||||
$graph->SetScale('textlin');
|
||||
$graph->SetMargin(50, 80, 20, 40);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
|
||||
$n = count($datay); // Number of bars
|
||||
|
||||
global $_wrapperfilename;
|
||||
|
||||
// Create targets for the image maps. One for each column
|
||||
$targ = array();
|
||||
$alt = array();
|
||||
$wtarg = array();
|
||||
for ($i = 0; $i < $n; ++$i) {
|
||||
$urlarg = 'clickedon=' . ($i + 1);
|
||||
$targ[] = $_wrapperfilename . '?' . $urlarg;
|
||||
$alt[] = 'val=%d';
|
||||
$wtarg[] = '';
|
||||
}
|
||||
$bplot->SetCSIMTargets($targ, $alt, $wtarg);
|
||||
|
||||
$graph->Add($bplot);
|
||||
|
||||
$graph->title->Set('Multiple Image maps');
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->title->SetCSIMTarget('#45', 'Title for Bar', '_blank');
|
||||
|
||||
$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->yaxis->title->SetCSIMTarget('#55', 'Y-axis title');
|
||||
$graph->yaxis->title->Set("Y-title");
|
||||
|
||||
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->xaxis->title->SetCSIMTarget('#55', 'X-axis title');
|
||||
$graph->xaxis->title->Set("X-title");
|
||||
|
||||
// Send back the image when we are called from within the <img> tag
|
||||
$graph->StrokeCSIMImage();
|
||||
@@ -1,75 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// Example of pie with center circle
|
||||
require_once('jpgraph/jpgraph.php');
|
||||
require_once('jpgraph/jpgraph_pie.php');
|
||||
|
||||
// Some data
|
||||
$data = array(50,28,25,27,31,20);
|
||||
|
||||
// A new pie graph
|
||||
$piegraph = new PieGraph(400, 320);
|
||||
|
||||
$n = count($data) ; // Number of slices
|
||||
|
||||
// No border around graph
|
||||
$piegraph->SetFrame(false);
|
||||
|
||||
// Setup title
|
||||
$piegraph->title->Set("CSIM Center Pie plot");
|
||||
$piegraph->title->SetFont(FF_ARIAL, FS_BOLD, 18);
|
||||
$piegraph->title->SetMargin(8); // Add a little bit more margin from the top
|
||||
|
||||
// Create the pie plot
|
||||
$p1 = new PiePlotC($data);
|
||||
|
||||
// Set the radius of pie (as fraction of image size)
|
||||
$p1->SetSize(0.32);
|
||||
|
||||
// Label font and color setup
|
||||
$p1->value->SetFont(FF_ARIAL, FS_BOLD, 11);
|
||||
$p1->value->SetColor('white');
|
||||
|
||||
// Setup the title on the center circle
|
||||
$p1->midtitle->Set("Distribution\n2008 H1");
|
||||
$p1->midtitle->SetFont(FF_ARIAL, FS_NORMAL, 12);
|
||||
|
||||
// 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);
|
||||
|
||||
// The label array values may have printf() formatting in them. The argument to the
|
||||
// form,at string will be the value of the slice (either the percetage or absolute
|
||||
// depending on what was specified in the SetLabelType() above.
|
||||
$lbl = array("Jan\n%.1f%%","Feb\n%.1f%%","March\n%.1f%%",
|
||||
"Apr\n%.1f%%","May\n%.1f%%","Jun\n%.1f%%");
|
||||
$p1->SetLabels($lbl);
|
||||
|
||||
// Add drop shadow to slices
|
||||
$p1->SetShadow();
|
||||
|
||||
// Explode all slices 15 pixels
|
||||
$p1->ExplodeAll(15);
|
||||
|
||||
// Setup the CSIM targets
|
||||
global $_wrapperfilename;
|
||||
$targ = array(); $alt = array(); $wtarg = array();
|
||||
for ($i=0; $i <= $n; ++$i) {
|
||||
$urlarg = 'pie_clickedon='.($i + 1);
|
||||
$targ[] = $_wrapperfilename.'?'.$urlarg;
|
||||
$alt[] = 'val=%d';
|
||||
$wtarg[] = '';
|
||||
}
|
||||
$p1->SetCSIMTargets($targ, $alt, $wtarg);
|
||||
$p1->SetMidCSIM($targ[0], $alt[0], $wtarg[0]);
|
||||
|
||||
// Add plot to pie graph
|
||||
$piegraph->Add($p1);
|
||||
|
||||
// Send back the image when we are called from within the <img> tag
|
||||
$piegraph->StrokeCSIMImage();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
-273
@@ -1,273 +0,0 @@
|
||||
<?php
|
||||
|
||||
// Dataset to be used by some date scale utils examples
|
||||
|
||||
$ydata = array(
|
||||
0 => 1.0885908919277, 1 =>
|
||||
0.99034385297982, 2 => 0.97005467188578, 3 =>
|
||||
0.99901201350824, 4 => 1.1263167971152, 5 =>
|
||||
1.0582808133448, 6 => 1.0216740689064, 7 =>
|
||||
0.96626236356644, 8 => 1.0125912828768, 9 =>
|
||||
0.99047473992496, 10 => 0.99102472104561, 11 =>
|
||||
0.98500781573283, 12 => 0.91933668914198, 13 =>
|
||||
0.92234602792711, 14 => 0.88933863410054, 15 =>
|
||||
0.94236150975178, 16 => 0.98924287679116, 17 =>
|
||||
1.0342765545566, 18 => 1.0538510278089, 19 =>
|
||||
0.93496076181191, 20 => 0.90944479677235, 21 =>
|
||||
0.80831866316983, 22 => 0.81912434615535, 23 =>
|
||||
0.83143770042109, 24 => 0.86972168159496, 25 =>
|
||||
0.92645774571577, 26 => 0.81169120061422, 27 =>
|
||||
0.84409853057606, 28 => 0.89065856249272, 29 =>
|
||||
0.83551478929348, 30 => 0.87015680306726, 31 =>
|
||||
0.76063327042172, 32 => 0.82720958380697, 33 =>
|
||||
0.86565279505723, 34 => 0.77858966246836, 35 =>
|
||||
0.81009606378237, 36 => 0.80485136798149, 37 =>
|
||||
0.82641461943804, 38 => 0.87442020676513, 39 =>
|
||||
0.89589150146825, 40 => 0.92082995956816, 41 =>
|
||||
0.92614241931726, 42 => 0.96915564652581, 43 =>
|
||||
1.003753706293, 44 => 0.97438809368023, 45 =>
|
||||
1.011556766867, 46 => 1.0785692014115, 47 =>
|
||||
1.0586915420364, 48 => 1.284210059027, 49 =>
|
||||
1.3424512661794, 50 => 1.1743365450983, 51 =>
|
||||
1.2387345559532, 52 => 1.2485728609648, 53 =>
|
||||
1.2330096418558, 54 => 1.1857882621709, 55 =>
|
||||
1.2344956522411, 56 => 1.2047675730648, 57 =>
|
||||
1.292419000136, 58 => 1.3405480219013, 59 =>
|
||||
1.3971752198648, 60 => 1.4359555309649, 61 =>
|
||||
1.3243735045701, 62 => 1.2359389187087, 63 =>
|
||||
1.2201320423161, 64 => 1.3602246705197, 65 =>
|
||||
1.360886940568, 66 => 1.3493553211075, 67 =>
|
||||
1.4401769929405, 68 => 1.3979767849951, 69 =>
|
||||
1.4545882591647, 70 => 1.337801210539, 71 =>
|
||||
1.3793601365977, 72 => 1.4586769476223, 73 =>
|
||||
1.5230946076475, 74 => 1.4124735946125, 75 =>
|
||||
1.4030318592551, 76 => 1.349158816711, 77 =>
|
||||
1.3994840622105, 78 => 1.4239672612346, 79 =>
|
||||
1.40812256221, 80 => 1.4583856197192, 81 =>
|
||||
1.4613314581567, 82 => 1.6756755916668, 83 =>
|
||||
1.8580313939158, 84 => 1.8342360959805, 85 =>
|
||||
1.9216082598086, 86 => 1.9478846253628, 87 =>
|
||||
2.0244872112436, 88 => 1.9560660777181, 89 =>
|
||||
1.8415152640121, 90 => 1.8471764273372, 91 =>
|
||||
1.8889886695023, 92 => 1.8195007209252, 93 =>
|
||||
1.8960270595999, 94 => 1.8644490575386, 95 =>
|
||||
1.971196340772, 96 => 2.015583152659, 97 =>
|
||||
1.9959882430428, 98 => 2.1063668082622, 99 =>
|
||||
2.1719175769191, 100 => 2.1875938345039, 101 =>
|
||||
2.1587594039981, 102 => 2.1278241823627, 103 =>
|
||||
2.298793912594, 104 => 2.3723774302753, 105 =>
|
||||
2.4413392788904, 106 => 2.4834594954125, 107 =>
|
||||
2.5164271989421, 108 => 2.48274719503, 109 =>
|
||||
2.4492997581034, 110 => 2.1412357263019, 111 =>
|
||||
2.0314268112566, 112 => 1.9596098764628, 113 =>
|
||||
2.0250983127109, 114 => 1.924959829851, 115 =>
|
||||
1.9603612943993, 116 => 2.0540576271866, 117 =>
|
||||
2.0568349960689, 118 => 2.0811524692325, 119 =>
|
||||
2.0581964759165, 120 => 2.020162840272, 121 =>
|
||||
2.0626517638667, 122 => 1.9286563823225, 123 =>
|
||||
2.0127912437563, 124 => 1.9491858277931, 125 =>
|
||||
1.8692310150316, 126 => 1.6993275416762, 127 =>
|
||||
1.5849680675709, 128 => 1.5422481968304, 129 =>
|
||||
1.603188853916, 130 => 1.6449504349551, 131 =>
|
||||
1.6570332084417, 132 => 1.7563884552262, 133 =>
|
||||
1.7346008663135, 134 => 1.741307942998, 135 =>
|
||||
1.7415848536123, 136 => 1.7014366147405, 137 =>
|
||||
1.6719646364256, 138 => 1.7092888030342, 139 =>
|
||||
1.7371529028402, 140 => 1.7019154041991, 141 =>
|
||||
1.7662473702497, 142 => 1.8480766044197, 143 =>
|
||||
1.8355114169662, 144 => 1.7819817315586, 145 =>
|
||||
1.7148079481036, 146 => 1.6241989833489, 147 =>
|
||||
1.4624626548138, 148 => 1.5040542012939, 149 =>
|
||||
1.442295346913, 150 => 1.4187087000604, 151 =>
|
||||
1.4225097958511, 152 => 1.5001324671865, 153 =>
|
||||
1.4584802723727, 154 => 1.5342572961469, 155 =>
|
||||
1.514133174734, 156 => 1.5443934302345, 157 =>
|
||||
1.5476883863698, 158 => 1.6080128685721, 159 =>
|
||||
1.5816649899396, 160 => 1.5310436755918, 161 =>
|
||||
1.518280754595, 162 => 1.5216184249044, 163 =>
|
||||
1.4393414811719, 164 => 1.409379582707, 165 =>
|
||||
1.436861898056, 166 => 1.4739894373751, 167 =>
|
||||
1.4512785421546, 168 => 1.496057581316, 169 =>
|
||||
1.3817455776456, 170 => 1.2990312802211, 171 =>
|
||||
1.3073949130374, 172 => 1.2473214566896, 173 =>
|
||||
1.1105915111374, 174 => 1.0420360580822, 175 =>
|
||||
1.1744654786356, 176 => 1.0602876800127, 177 =>
|
||||
1.074408841208, 178 => 1.18387615056, 179 =>
|
||||
1.1890999077101, 180 => 1.0549293038746, 181 =>
|
||||
1.0570601708416, 182 => 1.0800216692849, 183 =>
|
||||
0.96274117702549, 184 => 0.9501673977047, 185 =>
|
||||
0.97710108451711, 186 => 0.89886322996001, 187 =>
|
||||
0.9239453369566, 188 => 0.96299807255386, 189 =>
|
||||
1.0105532418267, 190 => 1.0164009465948, 191 =>
|
||||
1.0413107606824, 192 => 1.0475248122459, 193 =>
|
||||
1.0266007451985, 194 => 1.0159556206533, 195 =>
|
||||
1.0943852922517, 196 => 1.0750418553654, 197 =>
|
||||
0.97774129938915, 198 => 0.98590717162284, 199 =>
|
||||
0.87713795242119, 200 => 0.90770624057599, 201 =>
|
||||
0.87557547650302, 202 => 0.95754187545856, 203 =>
|
||||
1.0111465867283, 204 => 0.93224663470275, 205 =>
|
||||
0.93886113881632, 206 => 0.94128877256653, 207 =>
|
||||
0.9559086414866, 208 => 0.97782683000598, 209 =>
|
||||
1.0648991708916, 210 => 1.1759619281479, 211 =>
|
||||
1.1323001889786, 212 => 1.2173222321276, 213 =>
|
||||
1.192219780365, 214 => 1.1507367671992, 215 =>
|
||||
1.0062415877475, 216 => 1.0017043563084, 217 =>
|
||||
0.94468309902865, 218 => 0.99384124056529, 219 =>
|
||||
1.0514822705943, 220 => 1.0451723914426, 221 =>
|
||||
1.0776122119814, 222 => 1.2013601009631, 223 =>
|
||||
1.1765086398423, 224 => 1.2387735028784, 225 =>
|
||||
1.2441365026242, 226 => 1.2694500268723, 227 =>
|
||||
1.2789962941485, 228 => 1.2442094256309, 229 =>
|
||||
1.2352688438234, 230 => 1.2571277155372, 231 =>
|
||||
1.3291795377077, 232 => 1.2703480599183, 233 =>
|
||||
1.30729508393, 234 => 1.3233030218068, 235 =>
|
||||
1.2861232143244, 236 => 1.3168684998023, 237 =>
|
||||
1.2499001566772, 238 => 1.2622769692485, 239 =>
|
||||
1.2160789893735, 240 => 1.2288877111321, 241 =>
|
||||
1.222967255453, 242 => 1.2998243638567, 243 =>
|
||||
1.3443008723449, 244 => 1.339680674028, 245 =>
|
||||
1.3779965791538, 246 => 1.3560080691721, 247 =>
|
||||
1.3470544172094, 248 => 1.3166882067851, 249 =>
|
||||
1.4452459865932, 250 => 1.4514278120119, 251 =>
|
||||
1.413690283372, 252 => 1.4178934332405, 253 =>
|
||||
1.4237414657565, 254 => 1.3777636409301, 255 =>
|
||||
1.4041849448389, 256 => 1.4049533546771, 257 =>
|
||||
1.4277375831259, 258 => 1.4224090113077, 259 =>
|
||||
1.4647907974628, 260 => 1.4243190632657, 261 =>
|
||||
1.4286580133998, 262 => 1.4348828641501, 263 =>
|
||||
1.415409243977, 264 => 1.4476028555859, 265 =>
|
||||
1.4538821661641, 266 => 1.4883184435336, 267 =>
|
||||
1.4205032194634, 268 => 1.3856543933372, 269 =>
|
||||
1.2716906168086, 270 => 1.3462117624752, 271 =>
|
||||
1.3003015423298, 272 => 1.2148491725878, 273 =>
|
||||
1.2605381058318, 274 => 1.2690047369619, 275 =>
|
||||
1.3327723638582, 276 => 1.3118643588249, 277 =>
|
||||
1.293007944258, 278 => 1.2548761810876, 279 =>
|
||||
1.3335015938603, 280 => 1.3152744239077, 281 =>
|
||||
1.2564376463182, 282 => 1.2478417859372, 283 =>
|
||||
1.2518821298414, 284 => 1.2036453589032, 285 =>
|
||||
1.1798564480155, 286 => 1.2062515260098, 287 =>
|
||||
1.2129817801455, 288 => 1.1405762096618, 289 =>
|
||||
1.0161049810033, 290 => 1.0030124197677, 291 =>
|
||||
1.0111565082559, 292 => 1.0084286839061, 293 =>
|
||||
0.95068297130577, 294 => 1.0450005357207, 295 =>
|
||||
1.211596899292, 296 => 1.3762615912002, 297 =>
|
||||
1.530127116787, 298 => 1.5167370832585, 299 =>
|
||||
1.6259521507076, 300 => 1.6518467383405, 301 =>
|
||||
1.7713043850286, 302 => 1.6396708687084, 303 =>
|
||||
1.6116177484122, 304 => 1.5225729470695, 305 =>
|
||||
1.6101471149808);
|
||||
|
||||
|
||||
$xdata = array(
|
||||
|
||||
0 => 444348000, 1 => 446853600, 2 =>
|
||||
449532000, 3 => 452124000, 4 => 454802400, 5 =>
|
||||
457394400, 6 => 460072800, 7 => 462751200, 8 =>
|
||||
465343200, 9 => 468021600, 10 => 470613600, 11 =>
|
||||
473292000, 12 => 475970400, 13 => 478389600, 14 =>
|
||||
481068000, 15 => 483660000, 16 => 486338400, 17 =>
|
||||
488930400, 18 => 491608800, 19 => 494287200, 20 =>
|
||||
496879200, 21 => 499557600, 22 => 502149600, 23 =>
|
||||
504828000, 24 => 507506400, 25 => 509925600, 26 =>
|
||||
512604000, 27 => 515196000, 28 => 517874400, 29 =>
|
||||
520466400, 30 => 523144800, 31 => 525823200, 32 =>
|
||||
528415200, 33 => 531093600, 34 => 533685600, 35 =>
|
||||
536364000, 36 => 539042400, 37 => 541461600, 38 =>
|
||||
544140000, 39 => 546732000, 40 => 549410400, 41 =>
|
||||
552002400, 42 => 554680800, 43 => 557359200, 44 =>
|
||||
559951200, 45 => 562629600, 46 => 565221600, 47 =>
|
||||
567900000, 48 => 570578400, 49 => 573084000, 50 =>
|
||||
575762400, 51 => 578354400, 52 => 581032800, 53 =>
|
||||
583624800, 54 => 586303200, 55 => 588981600, 56 =>
|
||||
591573600, 57 => 594252000, 58 => 596844000, 59 =>
|
||||
599522400, 60 => 602200800, 61 => 604620000, 62 =>
|
||||
607298400, 63 => 609890400, 64 => 612568800, 65 =>
|
||||
615160800, 66 => 617839200, 67 => 620517600, 68 =>
|
||||
623109600, 69 => 625788000, 70 => 628380000, 71 =>
|
||||
631058400, 72 => 633736800, 73 => 636156000, 74 =>
|
||||
638834400, 75 => 641426400, 76 => 644104800, 77 =>
|
||||
646696800, 78 => 649375200, 79 => 652053600, 80 =>
|
||||
654645600, 81 => 657324000, 82 => 659916000, 83 =>
|
||||
662594400, 84 => 665272800, 85 => 667692000, 86 =>
|
||||
670370400, 87 => 672962400, 88 => 675640800, 89 =>
|
||||
678232800, 90 => 680911200, 91 => 683589600, 92 =>
|
||||
686181600, 93 => 688860000, 94 => 691452000, 95 =>
|
||||
694130400, 96 => 696808800, 97 => 699314400, 98 =>
|
||||
701992800, 99 => 704584800, 100 => 707263200, 101 =>
|
||||
709855200, 102 => 712533600, 103 => 715212000, 104 =>
|
||||
717804000, 105 => 720482400, 106 => 723074400, 107 =>
|
||||
725752800, 108 => 728431200, 109 => 730850400, 110 =>
|
||||
733528800, 111 => 736120800, 112 => 738799200, 113 =>
|
||||
741391200, 114 => 744069600, 115 => 746748000, 116 =>
|
||||
749340000, 117 => 752018400, 118 => 754610400, 119 =>
|
||||
757288800, 120 => 759967200, 121 => 762386400, 122 =>
|
||||
765064800, 123 => 767656800, 124 => 770335200, 125 =>
|
||||
772927200, 126 => 775605600, 127 => 778284000, 128 =>
|
||||
780876000, 129 => 783554400, 130 => 786146400, 131 =>
|
||||
788824800, 132 => 791503200, 133 => 793922400, 134 =>
|
||||
796600800, 135 => 799192800, 136 => 801871200, 137 =>
|
||||
804463200, 138 => 807141600, 139 => 809820000, 140 =>
|
||||
812412000, 141 => 815090400, 142 => 817682400, 143 =>
|
||||
820360800, 144 => 823039200, 145 => 825544800, 146 =>
|
||||
828223200, 147 => 830815200, 148 => 833493600, 149 =>
|
||||
836085600, 150 => 838764000, 151 => 841442400, 152 =>
|
||||
844034400, 153 => 846712800, 154 => 849304800, 155 =>
|
||||
851983200, 156 => 854661600, 157 => 857080800, 158 =>
|
||||
859759200, 159 => 862351200, 160 => 865029600, 161 =>
|
||||
867621600, 162 => 870300000, 163 => 872978400, 164 =>
|
||||
875570400, 165 => 878248800, 166 => 880840800, 167 =>
|
||||
883519200, 168 => 886197600, 169 => 888616800, 170 =>
|
||||
891295200, 171 => 893887200, 172 => 896565600, 173 =>
|
||||
899157600, 174 => 901836000, 175 => 904514400, 176 =>
|
||||
907106400, 177 => 909784800, 178 => 912376800, 179 =>
|
||||
915055200, 180 => 917733600, 181 => 920152800, 182 =>
|
||||
922831200, 183 => 925423200, 184 => 928101600, 185 =>
|
||||
930693600, 186 => 933372000, 187 => 936050400, 188 =>
|
||||
938642400, 189 => 941320800, 190 => 943912800, 191 =>
|
||||
946591200, 192 => 949269600, 193 => 951775200, 194 =>
|
||||
954453600, 195 => 957045600, 196 => 959724000, 197 =>
|
||||
962316000, 198 => 964994400, 199 => 967672800, 200 =>
|
||||
970264800, 201 => 972943200, 202 => 975535200, 203 =>
|
||||
978213600, 204 => 980892000, 205 => 983311200, 206 =>
|
||||
985989600, 207 => 988581600, 208 => 991260000, 209 =>
|
||||
993852000, 210 => 996530400, 211 => 999208800, 212 =>
|
||||
1001800800, 213 => 1004479200, 214 => 1007071200,
|
||||
215 => 1009749600, 216 => 1012428000, 217 =>
|
||||
1014847200, 218 => 1017525600, 219 => 1020117600,
|
||||
220 => 1022796000, 221 => 1025388000, 222 =>
|
||||
1028066400, 223 => 1030744800, 224 => 1033336800,
|
||||
225 => 1036015200, 226 => 1038607200, 227 =>
|
||||
1041285600, 228 => 1043964000, 229 => 1046383200,
|
||||
230 => 1049061600, 231 => 1051653600, 232 =>
|
||||
1054332000, 233 => 1056924000, 234 => 1059602400,
|
||||
235 => 1062280800, 236 => 1064872800, 237 =>
|
||||
1067551200, 238 => 1070143200, 239 => 1072821600,
|
||||
240 => 1075500000, 241 => 1078005600, 242 =>
|
||||
1080684000, 243 => 1083276000, 244 => 1085954400,
|
||||
245 => 1088546400, 246 => 1091224800, 247 =>
|
||||
1093903200, 248 => 1096495200, 249 => 1099173600,
|
||||
250 => 1101765600, 251 => 1104444000, 252 =>
|
||||
1107122400, 253 => 1109541600, 254 => 1112220000,
|
||||
255 => 1114812000, 256 => 1117490400, 257 =>
|
||||
1120082400, 258 => 1122760800, 259 => 1125439200,
|
||||
260 => 1128031200, 261 => 1130709600, 262 =>
|
||||
1133301600, 263 => 1135980000, 264 => 1138658400,
|
||||
265 => 1141077600, 266 => 1143756000, 267 =>
|
||||
1146348000, 268 => 1149026400, 269 => 1151618400,
|
||||
270 => 1154296800, 271 => 1156975200, 272 =>
|
||||
1159567200, 273 => 1162245600, 274 => 1164837600,
|
||||
275 => 1167516000, 276 => 1170194400, 277 =>
|
||||
1172613600, 278 => 1175292000, 279 => 1177884000,
|
||||
280 => 1180562400, 281 => 1183154400, 282 =>
|
||||
1185832800, 283 => 1188511200, 284 => 1191103200,
|
||||
285 => 1193781600, 286 => 1196373600, 287 =>
|
||||
1199052000, 288 => 1201730400, 289 => 1204236000,
|
||||
290 => 1206914400, 291 => 1209506400, 292 =>
|
||||
1212184800, 293 => 1214776800, 294 => 1217455200,
|
||||
295 => 1220133600, 296 => 1222725600, 297 =>
|
||||
1225404000, 298 => 1227996000, 299 => 1230674400,
|
||||
300 => 1233352800, 301 => 1235772000, 302 =>
|
||||
1238450400, 303 => 1241042400, 304 => 1243720800,
|
||||
305 => 1246312800,
|
||||
);
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 608 B |
@@ -1,35 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$ydata = array(12, 19, 3, 9, 15, 10);
|
||||
|
||||
// The code to setup a very basic graph
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale('intlin');
|
||||
$graph->SetMargin(30, 15, 40, 30);
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->SetFrame(true, 'blue', 3);
|
||||
|
||||
$graph->title->Set('Label background');
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
|
||||
$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10);
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
$graph->subtitle->Set('"LABELBKG_NONE"');
|
||||
|
||||
$graph->SetAxisLabelBackground(LABELBKG_NONE, 'orange', 'red', 'lightblue', 'red');
|
||||
|
||||
// Use Ariel font
|
||||
$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->xgrid->Show();
|
||||
|
||||
// Create the plot line
|
||||
$p1 = new Plot\LinePlot($ydata);
|
||||
$graph->Add($p1);
|
||||
|
||||
// Output graph
|
||||
$graph->Stroke();
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$ydata = array(12, 19, 3, 9, 15, 10);
|
||||
|
||||
// The code to setup a very basic graph
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale('intlin');
|
||||
$graph->SetMargin(30, 15, 40, 30);
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->SetFrame(true, 'blue', 3);
|
||||
|
||||
$graph->title->Set('Label background');
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
|
||||
$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10);
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
$graph->subtitle->Set('"LABELBKG_XAXIS"');
|
||||
|
||||
$graph->SetAxisLabelBackground(LABELBKG_XAXIS, 'orange', 'red', 'lightblue', 'red');
|
||||
|
||||
// Use Ariel font
|
||||
$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->xgrid->Show();
|
||||
|
||||
// Create the plot line
|
||||
$p1 = new Plot\LinePlot($ydata);
|
||||
$graph->Add($p1);
|
||||
|
||||
// Output graph
|
||||
$graph->Stroke();
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$ydata = array(12, 19, 3, 9, 15, 10);
|
||||
|
||||
// The code to setup a very basic graph
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale('intlin');
|
||||
$graph->SetMargin(30, 15, 40, 30);
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->SetFrame(true, 'blue', 3);
|
||||
|
||||
$graph->title->Set('Label background');
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
|
||||
$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10);
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
$graph->subtitle->Set('"LABELBKG_YAXIS"');
|
||||
|
||||
$graph->SetAxisLabelBackground(LABELBKG_YAXIS, 'orange', 'red', 'lightblue', 'red');
|
||||
|
||||
// Use Ariel font
|
||||
$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->xgrid->Show();
|
||||
|
||||
// Create the plot line
|
||||
$p1 = new Plot\LinePlot($ydata);
|
||||
$graph->Add($p1);
|
||||
|
||||
// Output graph
|
||||
$graph->Stroke();
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$ydata = array(12, 19, 3, 9, 15, 10);
|
||||
|
||||
// The code to setup a very basic graph
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale('intlin');
|
||||
$graph->SetMargin(30, 15, 40, 30);
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->SetFrame(true, 'blue', 3);
|
||||
|
||||
$graph->title->Set('Label background');
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
|
||||
$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10);
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
$graph->subtitle->Set('"LABELBKG_YAXISFULL"');
|
||||
|
||||
$graph->SetAxisLabelBackground(LABELBKG_YAXISFULL, 'orange', 'red', 'lightblue', 'red');
|
||||
|
||||
// Use Ariel font
|
||||
$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->xgrid->Show();
|
||||
|
||||
// Create the plot line
|
||||
$p1 = new Plot\LinePlot($ydata);
|
||||
$graph->Add($p1);
|
||||
|
||||
// Output graph
|
||||
$graph->Stroke();
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$ydata = array(12, 19, 3, 9, 15, 10);
|
||||
|
||||
// The code to setup a very basic graph
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale('intlin');
|
||||
$graph->SetMargin(30, 15, 40, 30);
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->SetFrame(true, 'blue', 3);
|
||||
|
||||
$graph->title->Set('Label background');
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
|
||||
$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10);
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
$graph->subtitle->Set('"LABELBKG_XAXISFULL"');
|
||||
|
||||
$graph->SetAxisLabelBackground(LABELBKG_XAXISFULL, 'orange', 'red', 'lightblue', 'red');
|
||||
|
||||
// Use Ariel font
|
||||
$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->xgrid->Show();
|
||||
|
||||
// Create the plot line
|
||||
$p1 = new Plot\LinePlot($ydata);
|
||||
$graph->Add($p1);
|
||||
|
||||
// Output graph
|
||||
$graph->Stroke();
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$ydata = array(12, 19, 3, 9, 15, 10);
|
||||
|
||||
// The code to setup a very basic graph
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale('intlin');
|
||||
$graph->SetMargin(30, 15, 40, 30);
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->SetFrame(true, 'blue', 3);
|
||||
|
||||
$graph->title->Set('Label background');
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
|
||||
$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10);
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
$graph->subtitle->Set('"LABELBKG_XYFULL"');
|
||||
|
||||
$graph->SetAxisLabelBackground(LABELBKG_XYFULL, 'orange', 'red', 'lightblue', 'red');
|
||||
|
||||
// Use Ariel font
|
||||
$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->xgrid->Show();
|
||||
|
||||
// Create the plot line
|
||||
$p1 = new Plot\LinePlot($ydata);
|
||||
$graph->Add($p1);
|
||||
|
||||
// Output graph
|
||||
$graph->Stroke();
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$ydata = array(12, 19, 3, 9, 15, 10);
|
||||
|
||||
// The code to setup a very basic graph
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale('intlin');
|
||||
$graph->SetMargin(30, 15, 40, 30);
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->SetFrame(true, 'blue', 3);
|
||||
|
||||
$graph->title->Set('Label background');
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
|
||||
$graph->subtitle->SetFont(FF_ARIAL, FS_NORMAL, 10);
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
$graph->subtitle->Set('"LABELBKG_XY"');
|
||||
|
||||
$graph->SetAxisLabelBackground(LABELBKG_XY, 'orange', 'red', 'lightblue', 'red');
|
||||
|
||||
// Use Ariel font
|
||||
$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$graph->xgrid->Show();
|
||||
|
||||
// Create the plot line
|
||||
$p1 = new Plot\LinePlot($ydata);
|
||||
$graph->Add($p1);
|
||||
|
||||
// Output graph
|
||||
$graph->Stroke();
|
||||
@@ -1,28 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
require_once 'jpgraph/jpgraph_utils.inc.php';
|
||||
|
||||
$f = new FuncGenerator('cos($i)', '$i*$i*$i');
|
||||
list($xdata, $ydata) = $f->E(-M_PI, M_PI, 25);
|
||||
|
||||
$graph = new Graph\Graph(300, 200);
|
||||
$graph->SetScale("linlin");
|
||||
$graph->SetMargin(50, 50, 20, 30);
|
||||
$graph->SetFrame(false);
|
||||
$graph->SetBox(true, 'black', 2);
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->SetColor('lightyellow');
|
||||
|
||||
$graph->title->Set('Duplicating Y-axis');
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
$graph->SetAxisStyle(AXSTYLE_YBOXIN);
|
||||
$graph->xgrid->Show();
|
||||
|
||||
$lp1 = new Plot\LinePlot($ydata, $xdata);
|
||||
$lp1->SetColor("blue");
|
||||
$lp1->SetWeight(2);
|
||||
$graph->Add($lp1);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Callback to negate the argument
|
||||
function _cb_negate($aVal)
|
||||
{
|
||||
return round(-$aVal);
|
||||
}
|
||||
|
||||
// A fake depth curve
|
||||
$ydata = array(0, 1, 4, 5, 8, 9, 10, 14, 16, 16, 16, 18, 20, 20, 20, 22, 22.5, 22, 19, 19, 15, 15, 15, 15, 10, 10, 10, 6, 5, 5, 5, 4, 4, 2, 1, 0);
|
||||
|
||||
// Negate all data
|
||||
$n = count($ydata);
|
||||
for ($i = 0; $i < $n; ++$i) {
|
||||
$ydata[$i] = round(-$ydata[$i]);
|
||||
}
|
||||
|
||||
// Basic graph setup
|
||||
$graph = new Graph\Graph(400, 300);
|
||||
$graph->SetScale("linlin");
|
||||
$graph->img->SetMargin(50, 50, 60, 40);
|
||||
$graph->SetMarginColor('darkblue');
|
||||
$graph->SetColor('darkblue');
|
||||
$graph->SetAxisStyle(AXSTYLE_BOXOUT);
|
||||
|
||||
$graph->title->Set("Depth curve. Dive #2");
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->title->SetColor("white");
|
||||
|
||||
$graph->subtitle->Set("(Negated Y-axis)");
|
||||
$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL);
|
||||
$graph->subtitle->SetColor("white");
|
||||
|
||||
// Setup axis
|
||||
$graph->yaxis->SetLabelFormatCallback("_cb_negate");
|
||||
$graph->xaxis->SetColor("lightblue", "white");
|
||||
$graph->yaxis->SetColor("lightblue", "white");
|
||||
$graph->ygrid->SetColor("blue");
|
||||
|
||||
$lp1 = new Plot\LinePlot($ydata);
|
||||
$lp1->SetColor("yellow");
|
||||
$lp1->SetWeight(2);
|
||||
|
||||
$graph->Add($lp1);
|
||||
$graph->Stroke();
|
||||
@@ -1,49 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Callback to negate the argument
|
||||
function _cb_negate($aVal)
|
||||
{
|
||||
return round(-$aVal);
|
||||
}
|
||||
|
||||
// A fake depth curve
|
||||
$ydata = array(0, 1, 4, 5, 8, 9, 10, 14, 16, 16, 16, 18, 20, 20, 20, 22, 22.5, 22, 19, 19, 15, 15, 15, 15, 10, 10, 10, 6, 5, 5, 5, 4, 4, 2, 1, 0);
|
||||
|
||||
// Negate all data
|
||||
$n = count($ydata);
|
||||
for ($i = 0; $i < $n; ++$i) {
|
||||
$ydata[$i] = round(-$ydata[$i]);
|
||||
}
|
||||
|
||||
// Basic graph setup
|
||||
$graph = new Graph\Graph(400, 300);
|
||||
$graph->SetScale("linlin");
|
||||
$graph->img->SetMargin(50, 50, 60, 40);
|
||||
$graph->SetMarginColor('darkblue');
|
||||
$graph->SetColor('darkblue');
|
||||
$graph->SetAxisStyle(AXSTYLE_BOXOUT);
|
||||
$graph->SetBackgroundImage("blueblack400x300grad.png", 1);
|
||||
//$graph->SetBackgroundImage("lightbluedarkblue400x300grad.png",1);
|
||||
|
||||
$graph->title->Set("Depth curve. Dive #2");
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->title->SetColor("white");
|
||||
|
||||
$graph->subtitle->Set("(Negated Y-axis)");
|
||||
$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL);
|
||||
$graph->subtitle->SetColor("white");
|
||||
|
||||
// Setup axis
|
||||
$graph->yaxis->SetLabelFormatCallback("_cb_negate");
|
||||
$graph->xaxis->SetColor("lightblue", "white");
|
||||
$graph->yaxis->SetColor("lightblue", "white");
|
||||
$graph->ygrid->SetColor("blue");
|
||||
|
||||
$lp1 = new Plot\LinePlot($ydata);
|
||||
$lp1->SetColor("yellow");
|
||||
$lp1->SetWeight(2);
|
||||
|
||||
$graph->Add($lp1);
|
||||
$graph->Stroke();
|
||||
@@ -1,67 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Callback to negate the argument
|
||||
function _cb_negate($aVal)
|
||||
{
|
||||
return round(-$aVal);
|
||||
}
|
||||
|
||||
// A fake depth curve
|
||||
$ydata = array(0, 1, 4, 5, 8, 9, 10, 14, 16, 16, 16, 18, 20, 20, 20, 22, 22.5, 22, 19, 19, 15, 15, 15, 15, 10, 10, 10, 6, 5, 5, 5, 4, 4, 2, 1, 0);
|
||||
|
||||
$n = count($ydata);
|
||||
$y2data = array();
|
||||
for ($i = 0; $i < $n; ++$i) {
|
||||
$y2data[] = $ydata[$i] + 10;
|
||||
}
|
||||
|
||||
// Negate all data
|
||||
$n = count($ydata);
|
||||
for ($i = 0; $i < $n; ++$i) {
|
||||
$ydata[$i] = round(-$ydata[$i]);
|
||||
$y2data[$i] = round(-$y2data[$i]);
|
||||
}
|
||||
|
||||
// Basic graph setup
|
||||
$graph = new Graph\Graph(400, 300);
|
||||
$graph->SetScale("linlin");
|
||||
$graph->SetY2Scale("lin");
|
||||
$graph->SetMargin(50, 50, 60, 40);
|
||||
$graph->SetMarginColor('darkblue');
|
||||
$graph->SetColor('darkblue');
|
||||
|
||||
// Setup titles
|
||||
$graph->title->Set("Inverting both Y-axis");
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->title->SetColor("white");
|
||||
|
||||
$graph->subtitle->Set("(Negated Y & Y2 axis)");
|
||||
$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL);
|
||||
$graph->subtitle->SetColor("white");
|
||||
|
||||
// Setup axis
|
||||
$graph->yaxis->SetLabelFormatCallback("_cb_negate");
|
||||
$graph->xaxis->SetColor("lightblue", "white");
|
||||
$graph->yaxis->SetColor("lightblue", "white");
|
||||
$graph->ygrid->SetColor("blue");
|
||||
|
||||
// Setup Y2 axis
|
||||
$graph->y2axis->SetLabelFormatCallback("_cb_negate");
|
||||
$graph->y2axis->SetColor("darkred", "white");
|
||||
$graph->y2scale->SetAutoMax(0); // To make sure it starts with 0
|
||||
|
||||
// Setup plot 1
|
||||
$lp1 = new Plot\LinePlot($ydata);
|
||||
$lp1->SetColor("yellow");
|
||||
$lp1->SetWeight(2);
|
||||
$graph->Add($lp1);
|
||||
|
||||
// Setup plot 2
|
||||
$lp2 = new Plot\LinePlot($y2data);
|
||||
$lp2->SetColor("darkred");
|
||||
$lp2->SetWeight(2);
|
||||
$graph->AddY2($lp2);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,73 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Setup some dummy targets for the CSIM
|
||||
$n = 5;
|
||||
for ($i = 0; $i < $n; ++$i) {
|
||||
$targ1[$i] = "#$i";
|
||||
$targ2[$i] = "#$i";
|
||||
$targ3[$i] = "#$i";
|
||||
$alts1[$i] = "val=%d";
|
||||
$alts2[$i] = "val=%d";
|
||||
$alts3[$i] = "val=%d";
|
||||
}
|
||||
|
||||
// Some data for the points
|
||||
$datay1 = array(3, 10, 4, 1, 6);
|
||||
$datay2 = array(25, 22, 18, 24, 20);
|
||||
$datay3 = array(89, 70, 92, 77, 96);
|
||||
|
||||
// Create a basic graph with some suitable margins
|
||||
$graph = new Graph\Graph(500, 250);
|
||||
$graph->SetMargin(60, 180, 50, 40);
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->title->Set("Multi Y-axes with Image Map");
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Setup the scales for all axes
|
||||
$graph->SetScale("intlin");
|
||||
$graph->SetYScale(0, 'int');
|
||||
$graph->SetYScale(1, 'int');
|
||||
|
||||
// Standard Y-axis plot
|
||||
$lp1 = new Plot\LinePlot($datay1);
|
||||
$lp1->SetLegend('2001');
|
||||
$lp1->mark->SetType(MARK_DIAMOND);
|
||||
$lp1->mark->SetWidth(15);
|
||||
$lp1->mark->SetFillColor('orange');
|
||||
$lp1->SetCSIMTargets($targ1, $alts1);
|
||||
$graph->yaxis->title->Set('Basic Rate');
|
||||
$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 10);
|
||||
$graph->yaxis->title->SetColor('black');
|
||||
$graph->Add($lp1);
|
||||
|
||||
// First multi Y-axis plot
|
||||
$lp2 = new Plot\LinePlot($datay2);
|
||||
$lp2->SetLegend('2002');
|
||||
$lp2->mark->SetType(MARK_DIAMOND);
|
||||
$lp2->mark->SetWidth(15);
|
||||
$lp2->mark->SetFillColor('darkred');
|
||||
$lp2->SetCSIMTargets($targ2, $alts2);
|
||||
$graph->ynaxis[0]->SetColor('darkred');
|
||||
$graph->ynaxis[0]->title->Set('Rate A');
|
||||
$graph->ynaxis[0]->title->SetFont(FF_ARIAL, FS_BOLD, 10);
|
||||
$graph->ynaxis[0]->title->SetColor('darkred');
|
||||
$graph->AddY(0, $lp2);
|
||||
|
||||
// Second multi Y-axis plot
|
||||
$lp3 = new Plot\LinePlot($datay3);
|
||||
$lp3->SetLegend('2003');
|
||||
$lp3->mark->SetType(MARK_DIAMOND);
|
||||
$lp3->mark->SetWidth(15);
|
||||
$lp3->mark->SetFillColor('darkgreen');
|
||||
$lp3->SetCSIMTargets($targ3, $alts3);
|
||||
$graph->ynaxis[1]->SetColor('darkgreen');
|
||||
$graph->ynaxis[1]->title->Set('Rate B');
|
||||
$graph->ynaxis[1]->title->SetFont(FF_ARIAL, FS_BOLD, 10);
|
||||
$graph->ynaxis[1]->title->SetColor('darkgreen');
|
||||
$graph->AddY(1, $lp3);
|
||||
|
||||
// Send back the HTML page which will call this script again
|
||||
// to retrieve the image.
|
||||
$graph->StrokeCSIM();
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
$n = 8;
|
||||
for ($i = 0; $i < $n; ++$i) {
|
||||
$datay[$i] = rand(1, 10);
|
||||
$datay2[$i] = rand(10, 55);
|
||||
$datay3[$i] = rand(200, 600);
|
||||
$datay4[$i] = rand(500, 800);
|
||||
}
|
||||
|
||||
// Setup the graph
|
||||
$graph = new Graph\Graph(450, 250);
|
||||
$graph->SetMargin(40, 150, 40, 30);
|
||||
$graph->SetMarginColor('white');
|
||||
|
||||
$graph->SetScale('intlin');
|
||||
$graph->title->Set('Using multiple Y-axis');
|
||||
$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 14);
|
||||
|
||||
$graph->SetYScale(0, 'lin');
|
||||
$graph->SetYScale(1, 'lin');
|
||||
$graph->SetYScale(2, 'lin');
|
||||
|
||||
$p1 = new Plot\LinePlot($datay);
|
||||
$graph->Add($p1);
|
||||
|
||||
$p2 = new Plot\LinePlot($datay2);
|
||||
$p2->SetColor('teal');
|
||||
$graph->AddY(0, $p2);
|
||||
$graph->ynaxis[0]->SetColor('teal');
|
||||
|
||||
$p3 = new Plot\LinePlot($datay3);
|
||||
$p3->SetColor('red');
|
||||
$graph->AddY(1, $p3);
|
||||
$graph->ynaxis[1]->SetColor('red');
|
||||
|
||||
$p4 = new Plot\LinePlot($datay4);
|
||||
$p4->SetColor('blue');
|
||||
$graph->AddY(2, $p4);
|
||||
$graph->ynaxis[2]->SetColor('blue');
|
||||
|
||||
// Output line
|
||||
$graph->Stroke();
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Some data
|
||||
$datay = array(25, 29, 29, 39, 55);
|
||||
|
||||
$graph = new Graph\Graph(400, 200, 'auto');
|
||||
$graph->img->SetMargin(40, 40, 40, 20);
|
||||
|
||||
$graph->SetScale("linlin");
|
||||
$graph->SetShadow();
|
||||
$graph->title->Set("Top X-axis");
|
||||
|
||||
// Start at 0
|
||||
$graph->yscale->SetAutoMin(0);
|
||||
|
||||
// Add some air around the Y-scale
|
||||
$graph->yscale->SetGrace(100);
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Adjust the X-axis
|
||||
$graph->xaxis->SetPos("max");
|
||||
$graph->xaxis->SetLabelSide(SIDE_UP);
|
||||
$graph->xaxis->SetTickSide(SIDE_DOWN);
|
||||
|
||||
// Create the line plot
|
||||
$p1 = new Plot\LinePlot($datay);
|
||||
$p1->SetColor("blue");
|
||||
|
||||
// Specify marks for the line plots
|
||||
$p1->mark->SetType(MARK_FILLEDCIRCLE);
|
||||
$p1->mark->SetFillColor("red");
|
||||
$p1->mark->SetWidth(4);
|
||||
|
||||
// Show values
|
||||
$p1->value->Show();
|
||||
|
||||
// Add lineplot to graph
|
||||
$graph->Add($p1);
|
||||
|
||||
// Output line
|
||||
$graph->Stroke();
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$ydata = array(11, 3, 8, 12, 5, 1, 9, 13, 5, 7);
|
||||
|
||||
// Create the graph. These two calls are always required
|
||||
$graph = new Graph\Graph(350, 250);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMargin(40, 40, 50, 50);
|
||||
|
||||
// Setup the grid and plotarea box
|
||||
$graph->ygrid->SetLineStyle('dashed');
|
||||
$graph->ygrid->setColor('darkgray');
|
||||
$graph->SetBox(true);
|
||||
|
||||
// Steup graph titles
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
$graph->title->Set('Using background image');
|
||||
$graph->subtitle->SetFont(FF_COURIER, FS_BOLD, 11);
|
||||
$graph->subtitle->Set('"BGIMG_COPY"');
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
|
||||
// Add background with 25% mix
|
||||
$graph->SetBackgroundImage('heat1.jpg', BGIMG_COPY);
|
||||
$graph->SetBackgroundImageMix(25);
|
||||
|
||||
// Create the linear plot
|
||||
$lineplot = new Plot\LinePlot($ydata);
|
||||
$lineplot->SetColor("blue");
|
||||
|
||||
// Add the plot to the graph
|
||||
$graph->Add($lineplot);
|
||||
|
||||
// Display the graph
|
||||
$graph->Stroke();
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Some data
|
||||
$ydata = array(11, 3, 8, 12, 5, 1, 9, 13, 5, 7);
|
||||
|
||||
// Create the graph. These two calls are always required
|
||||
$graph = new Graph\Graph(350, 250);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMargin(40, 40, 50, 50);
|
||||
|
||||
// Setup the grid and plotarea box
|
||||
$graph->ygrid->SetLineStyle('dashed');
|
||||
$graph->ygrid->setColor('darkgray');
|
||||
$graph->SetBox(true);
|
||||
|
||||
// Steup graph titles
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
$graph->title->Set('Using background image');
|
||||
$graph->subtitle->SetFont(FF_COURIER, FS_BOLD, 11);
|
||||
$graph->subtitle->Set('"BGIMG_CENTER"');
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
|
||||
// Add background with 25% mix
|
||||
$graph->SetBackgroundImage('heat1.jpg', BGIMG_CENTER);
|
||||
$graph->SetBackgroundImageMix(25);
|
||||
|
||||
// Create the linear plot
|
||||
$lineplot = new Plot\LinePlot($ydata);
|
||||
$lineplot->SetColor("blue");
|
||||
|
||||
// Add the plot to the graph
|
||||
$graph->Add($lineplot);
|
||||
|
||||
// Display the graph
|
||||
$graph->Stroke();
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Some data
|
||||
$ydata = array(11, 3, 8, 12, 5, 1, 9, 13, 5, 7);
|
||||
|
||||
// Create the graph. These two calls are always required
|
||||
$graph = new Graph\Graph(350, 250);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMargin(40, 40, 50, 50);
|
||||
|
||||
// Setup the grid and plotarea box
|
||||
$graph->ygrid->SetLineStyle('dashed');
|
||||
$graph->ygrid->setColor('darkgray');
|
||||
$graph->SetBox(true);
|
||||
|
||||
// Steup graph titles
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
$graph->title->Set('Using background image');
|
||||
$graph->subtitle->SetFont(FF_COURIER, FS_BOLD, 11);
|
||||
$graph->subtitle->Set('"BGIMG_FREE"');
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
|
||||
// Add background with 25% mix
|
||||
$graph->SetBackgroundImage('heat1.jpg', BGIMG_FREE);
|
||||
$graph->SetBackgroundImageMix(25);
|
||||
|
||||
// Create the linear plot
|
||||
$lineplot = new Plot\LinePlot($ydata);
|
||||
$lineplot->SetColor("blue");
|
||||
|
||||
// Add the plot to the graph
|
||||
$graph->Add($lineplot);
|
||||
|
||||
// Display the graph
|
||||
$graph->Stroke();
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Some data
|
||||
$ydata = array(11, 3, 8, 12, 5, 1, 9, 13, 5, 7);
|
||||
|
||||
// Create the graph. These two calls are always required
|
||||
$graph = new Graph\Graph(350, 250);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMargin(40, 40, 50, 50);
|
||||
|
||||
// Setup the grid and plotarea box
|
||||
$graph->ygrid->SetLineStyle('dashed');
|
||||
$graph->ygrid->setColor('darkgray');
|
||||
$graph->SetBox(true);
|
||||
|
||||
// Steup graph titles
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
$graph->title->Set('Using background image');
|
||||
$graph->subtitle->SetFont(FF_COURIER, FS_BOLD, 11);
|
||||
$graph->subtitle->Set('"BGIMG_FILLPLOT"');
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
|
||||
// Add background with 25% mix
|
||||
$graph->SetBackgroundImage('heat1.jpg', BGIMG_FILLPLOT);
|
||||
$graph->SetBackgroundImageMix(25);
|
||||
|
||||
// Create the linear plot
|
||||
$lineplot = new Plot\LinePlot($ydata);
|
||||
$lineplot->SetColor("blue");
|
||||
|
||||
// Add the plot to the graph
|
||||
$graph->Add($lineplot);
|
||||
|
||||
// Display the graph
|
||||
$graph->Stroke();
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Some data
|
||||
$ydata = array(11, 3, 8, 12, 5, 1, 9, 13, 5, 7);
|
||||
|
||||
// Create the graph. These two calls are always required
|
||||
$graph = new Graph\Graph(350, 250);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMargin(40, 40, 50, 50);
|
||||
|
||||
// Setup the grid and plotarea box
|
||||
$graph->ygrid->SetLineStyle('dashed');
|
||||
$graph->ygrid->setColor('darkgray');
|
||||
$graph->SetBox(true);
|
||||
|
||||
// Steup graph titles
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
$graph->title->Set('Using background image');
|
||||
$graph->subtitle->SetFont(FF_COURIER, FS_BOLD, 11);
|
||||
$graph->subtitle->Set('"BGIMG_FILLFRAME"');
|
||||
$graph->subtitle->SetColor('darkred');
|
||||
|
||||
// Add background with 25% mix
|
||||
$graph->SetBackgroundImage('heat1.jpg', BGIMG_FILLFRAME);
|
||||
$graph->SetBackgroundImageMix(25);
|
||||
|
||||
// Create the linear plot
|
||||
$lineplot = new Plot\LinePlot($ydata);
|
||||
$lineplot->SetColor("blue");
|
||||
|
||||
// Add the plot to the graph
|
||||
$graph->Add($lineplot);
|
||||
|
||||
// Display the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Some data
|
||||
$datay = array(28, 19, 18, 23, 12, 11);
|
||||
$data2y = array(14, 18, 33, 29, 39, 55);
|
||||
|
||||
// A nice graph with anti-aliasing
|
||||
$graph = new Graph\Graph(400, 200);
|
||||
$graph->img->SetMargin(40, 180, 40, 40);
|
||||
$graph->SetBackgroundImage("tiger_bkg.png", BGIMG_FILLPLOT);
|
||||
|
||||
$graph->img->SetAntiAliasing("white");
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetShadow();
|
||||
$graph->title->Set("Background image");
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Slightly adjust the legend from it's default position in the
|
||||
// top right corner.
|
||||
$graph->legend->Pos(0.05, 0.5, "right", "center");
|
||||
|
||||
// Create the first line
|
||||
$p1 = new Plot\LinePlot($datay);
|
||||
$p1->mark->SetType(MARK_FILLEDCIRCLE);
|
||||
$p1->mark->SetFillColor("red");
|
||||
$p1->mark->SetWidth(4);
|
||||
$p1->SetColor("blue");
|
||||
$p1->SetCenter();
|
||||
$p1->SetLegend("Triumph Tiger -98");
|
||||
$graph->Add($p1);
|
||||
|
||||
// ... and the second
|
||||
$p2 = new Plot\LinePlot($data2y);
|
||||
$p2->mark->SetType(MARK_STAR);
|
||||
$p2->mark->SetFillColor("red");
|
||||
$p2->mark->SetWidth(4);
|
||||
$p2->SetColor("red");
|
||||
$p2->SetCenter();
|
||||
$p2->SetLegend("New tiger -99");
|
||||
$graph->Add($p2);
|
||||
|
||||
// Output line
|
||||
$graph->Stroke();
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Some data
|
||||
$datay = array(28, 19, 18, 23, 12, 11);
|
||||
$data2y = array(14, 18, 33, 29, 39, 55);
|
||||
|
||||
// A nice graph with anti-aliasing
|
||||
$graph = new Graph\Graph(400, 200);
|
||||
$graph->img->SetMargin(40, 180, 40, 40);
|
||||
$graph->SetBackgroundImage("tiger_bkg.png", BGIMG_FILLFRAME);
|
||||
|
||||
$graph->img->SetAntiAliasing();
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetShadow();
|
||||
$graph->title->Set("Background image");
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Slightly adjust the legend from it's default position in the
|
||||
// top right corner.
|
||||
$graph->legend->Pos(0.05, 0.5, "right", "center");
|
||||
|
||||
// Create the first line
|
||||
$p1 = new Plot\LinePlot($datay);
|
||||
$p1->mark->SetType(MARK_FILLEDCIRCLE);
|
||||
$p1->mark->SetFillColor("red");
|
||||
$p1->mark->SetWidth(4);
|
||||
$p1->SetColor("blue");
|
||||
$p1->SetCenter();
|
||||
$p1->SetLegend("Triumph Tiger -98");
|
||||
$graph->Add($p1);
|
||||
|
||||
// ... and the second
|
||||
$p2 = new Plot\LinePlot($data2y);
|
||||
$p2->mark->SetType(MARK_STAR);
|
||||
$p2->mark->SetFillColor("red");
|
||||
$p2->mark->SetWidth(4);
|
||||
$p2->SetColor("red");
|
||||
$p2->SetCenter();
|
||||
$p2->SetLegend("New tiger -99");
|
||||
$graph->Add($p2);
|
||||
|
||||
// Output line
|
||||
$graph->Stroke();
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once 'jpgraph/jpgraph.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Some data
|
||||
$datay = array(28, 19, 18, 23, 12, 11);
|
||||
$data2y = array(14, 18, 33, 29, 39, 55);
|
||||
|
||||
// A nice graph with anti-aliasing
|
||||
$graph = new Graph\Graph(400, 200);
|
||||
$graph->img->SetMargin(40, 180, 40, 40);
|
||||
$graph->SetBackgroundImage("tiger_bkg.png", BGIMG_COPY);
|
||||
|
||||
$graph->img->SetAntiAliasing("white");
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetShadow();
|
||||
$graph->title->Set("Background image");
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Slightly adjust the legend from it's default position in the
|
||||
// top right corner.
|
||||
$graph->legend->Pos(0.05, 0.5, "right", "center");
|
||||
|
||||
// Create the first line
|
||||
$p1 = new Plot\LinePlot($datay);
|
||||
$p1->mark->SetType(MARK_FILLEDCIRCLE);
|
||||
$p1->mark->SetFillColor("red");
|
||||
$p1->mark->SetWidth(4);
|
||||
$p1->SetColor("blue");
|
||||
$p1->SetCenter();
|
||||
$p1->SetLegend("Triumph Tiger -98");
|
||||
$graph->Add($p1);
|
||||
|
||||
// ... and the second
|
||||
$p2 = new Plot\LinePlot($data2y);
|
||||
$p2->mark->SetType(MARK_STAR);
|
||||
$p2->mark->SetFillColor("red");
|
||||
$p2->mark->SetWidth(4);
|
||||
$p2->SetColor("red");
|
||||
$p2->SetCenter();
|
||||
$p2->SetLegend("New tiger -99");
|
||||
$graph->Add($p2);
|
||||
|
||||
// Output line
|
||||
$graph->Stroke();
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$data1y = array(-8, 8, 9, 3, 5, 6);
|
||||
$data2y = array(18, 2, 1, 7, 5, 4);
|
||||
|
||||
// Create the graph. These two calls are always required
|
||||
$graph = new Graph\Graph(500, 400);
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
$graph->SetShadow();
|
||||
$graph->img->SetMargin(40, 30, 20, 40);
|
||||
|
||||
// Create the bar plots
|
||||
$b1plot = new Plot\BarPlot($data1y);
|
||||
$b1plot->SetFillColor("orange");
|
||||
$b1plot->value->Show();
|
||||
$b2plot = new Plot\BarPlot($data2y);
|
||||
$b2plot->SetFillColor("blue");
|
||||
$b2plot->value->Show();
|
||||
|
||||
// Create the grouped bar plot
|
||||
$gbplot = new Plot\AccBarPlot(array($b1plot, $b2plot));
|
||||
|
||||
// ...and add it to the graPH
|
||||
$graph->Add($gbplot);
|
||||
|
||||
$graph->title->Set("Accumulated bar plots");
|
||||
$graph->xaxis->title->Set("X-title");
|
||||
$graph->yaxis->title->Set("Y-title");
|
||||
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Display the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay1 = array(13, 8, 19, 7, 17, 6);
|
||||
$datay2 = array(4, 5, 2, 7, 5, 25);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(350, 250);
|
||||
$graph->SetScale('textlin');
|
||||
$graph->SetMarginColor('white');
|
||||
|
||||
// Setup title
|
||||
$graph->title->Set('Acc bar with gradient');
|
||||
|
||||
// Create the first bar
|
||||
$bplot = new Plot\BarPlot($datay1);
|
||||
$bplot->SetFillGradient('AntiqueWhite2', 'AntiqueWhite4:0.8', GRAD_VERT);
|
||||
$bplot->SetColor('darkred');
|
||||
|
||||
// Create the second bar
|
||||
$bplot2 = new Plot\BarPlot($datay2);
|
||||
$bplot2->SetFillGradient('olivedrab1', 'olivedrab4', GRAD_VERT);
|
||||
$bplot2->SetColor('darkgreen');
|
||||
|
||||
// And join them in an accumulated bar
|
||||
$accbplot = new Plot\AccBarPlot(array($bplot, $bplot2));
|
||||
$graph->Add($accbplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay1 = array(13, 8, 19, 7, 17, 6);
|
||||
$datay2 = array(4, 5, 2, 7, 5, 25);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(350, 250);
|
||||
$graph->SetScale('textlin');
|
||||
$graph->SetMarginColor('white');
|
||||
|
||||
// Setup title
|
||||
$graph->title->Set('Acc bar with gradient');
|
||||
|
||||
// Create the first bar
|
||||
$bplot = new Plot\BarPlot($datay1);
|
||||
$bplot->SetFillGradient('AntiqueWhite2', 'AntiqueWhite4:0.8', GRAD_VERT);
|
||||
$bplot->SetColor('darkred');
|
||||
|
||||
// Create the second bar
|
||||
$bplot2 = new Plot\BarPlot($datay2);
|
||||
$bplot2->SetFillGradient('olivedrab1', 'olivedrab4', GRAD_VERT);
|
||||
$bplot2->SetColor('darkgreen');
|
||||
|
||||
// And join them in an accumulated bar
|
||||
$accbplot = new Plot\AccBarPlot(array($bplot, $bplot2));
|
||||
$accbplot->SetColor('red');
|
||||
$accbplot->SetWeight(1);
|
||||
$graph->Add($accbplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay1 = array(13, 8, 19, 7, 17, 6);
|
||||
$datay2 = array(4, 5, 2, 7, 5, 25);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(350, 250);
|
||||
$graph->SetScale('textlin');
|
||||
$graph->SetMarginColor('white');
|
||||
|
||||
// Setup title
|
||||
$graph->title->Set('Acc bar with gradient');
|
||||
|
||||
// Create the first bar
|
||||
$bplot = new Plot\BarPlot($datay1);
|
||||
$bplot->SetFillGradient('AntiqueWhite2', 'AntiqueWhite4:0.8', GRAD_VERT);
|
||||
$bplot->SetColor('darkred');
|
||||
$bplot->SetWeight(0);
|
||||
|
||||
// Create the second bar
|
||||
$bplot2 = new Plot\BarPlot($datay2);
|
||||
$bplot2->SetFillGradient('olivedrab1', 'olivedrab4', GRAD_VERT);
|
||||
$bplot2->SetColor('darkgreen');
|
||||
$bplot2->SetWeight(0);
|
||||
|
||||
// And join them in an accumulated bar
|
||||
$accbplot = new Plot\AccBarPlot(array($bplot, $bplot2));
|
||||
$accbplot->SetColor('darkgray');
|
||||
$accbplot->SetWeight(1);
|
||||
$graph->Add($accbplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,75 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$datay1 = array(140, 110, 50, 60);
|
||||
$datay2 = array(35, 90, 190, 190);
|
||||
$datay3 = array(20, 60, 70, 140);
|
||||
|
||||
// Create the basic graph
|
||||
$graph = new Graph\Graph(450, 250, 'auto');
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(40, 80, 30, 40);
|
||||
|
||||
// Adjust the position of the legend box
|
||||
$graph->legend->Pos(0.02, 0.15);
|
||||
|
||||
// Adjust the color for theshadow of the legend
|
||||
$graph->legend->SetShadow('[email protected]');
|
||||
$graph->legend->SetFillColor('[email protected]');
|
||||
|
||||
// Get localised version of the month names
|
||||
$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());
|
||||
|
||||
// Set a nice summer (in Stockholm) image
|
||||
$graph->SetBackgroundImage('stship.jpg', BGIMG_COPY);
|
||||
|
||||
// Set axis titles and fonts
|
||||
$graph->xaxis->title->Set('Year 2002');
|
||||
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->xaxis->title->SetColor('white');
|
||||
|
||||
$graph->xaxis->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->xaxis->SetColor('white');
|
||||
|
||||
$graph->yaxis->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->yaxis->SetColor('white');
|
||||
|
||||
//$graph->ygrid->Show(false);
|
||||
$graph->ygrid->SetColor('[email protected]');
|
||||
|
||||
// Setup graph title
|
||||
$graph->title->Set('Using alpha blending with a background');
|
||||
// Some extra margin (from the top)
|
||||
$graph->title->SetMargin(3);
|
||||
$graph->title->SetFont(FF_ARIAL, FS_NORMAL, 12);
|
||||
|
||||
// Create the three var series we will combine
|
||||
$bplot1 = new Plot\BarPlot($datay1);
|
||||
$bplot2 = new Plot\BarPlot($datay2);
|
||||
$bplot3 = new Plot\BarPlot($datay3);
|
||||
|
||||
// Setup the colors with 40% transparency (alpha channel)
|
||||
$bplot1->SetFillColor('[email protected]');
|
||||
$bplot2->SetFillColor('[email protected]');
|
||||
$bplot3->SetFillColor('[email protected]');
|
||||
|
||||
// Setup legends
|
||||
$bplot1->SetLegend('Label 1');
|
||||
$bplot2->SetLegend('Label 2');
|
||||
$bplot3->SetLegend('Label 3');
|
||||
|
||||
// Setup each bar with a shadow of 50% transparency
|
||||
$bplot1->SetShadow('[email protected]');
|
||||
$bplot2->SetShadow('[email protected]');
|
||||
$bplot3->SetShadow('[email protected]');
|
||||
|
||||
$gbarplot = new Plot\GroupBarPlot(array($bplot1, $bplot2, $bplot3));
|
||||
$gbarplot->SetWidth(0.6);
|
||||
$graph->Add($gbarplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay = array(20, 30, 50, 80);
|
||||
$datay2 = array(430, 645, 223, 690);
|
||||
$datazero = array(0, 0, 0, 0);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(450, 200);
|
||||
$graph->title->Set('Example with 2 scale bars');
|
||||
|
||||
// Setup Y and Y2 scales with some "grace"
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetY2Scale("lin");
|
||||
$graph->yaxis->scale->SetGrace(30);
|
||||
$graph->y2axis->scale->SetGrace(30);
|
||||
|
||||
//$graph->ygrid->Show(true,true);
|
||||
$graph->ygrid->SetColor('gray', '[email protected]');
|
||||
|
||||
// Setup graph colors
|
||||
$graph->SetMarginColor('white');
|
||||
$graph->y2axis->SetColor('darkred');
|
||||
|
||||
// Create the "dummy" 0 bplot
|
||||
$bplotzero = new Plot\BarPlot($datazero);
|
||||
|
||||
// Create the "Y" axis group
|
||||
$ybplot1 = new Plot\BarPlot($datay);
|
||||
$ybplot1->value->Show();
|
||||
$ybplot = new Plot\GroupBarPlot(array($ybplot1, $bplotzero));
|
||||
|
||||
// Create the "Y2" axis group
|
||||
$ybplot2 = new Plot\BarPlot($datay2);
|
||||
$ybplot2->value->Show();
|
||||
$ybplot2->value->SetColor('darkred');
|
||||
$ybplot2->SetFillColor('darkred');
|
||||
$y2bplot = new Plot\GroupBarPlot(array($bplotzero, $ybplot2));
|
||||
|
||||
// Add the grouped bar plots to the graph
|
||||
$graph->Add($ybplot);
|
||||
$graph->AddY2($y2bplot);
|
||||
|
||||
// .. and finally stroke the image back to browser
|
||||
$graph->Stroke();
|
||||
@@ -1,50 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay = array(12, 26, 9, 17, 31);
|
||||
|
||||
// Create the graph.
|
||||
// One minute timeout for the cached image
|
||||
// INLINE_NO means don't stream it back to the browser.
|
||||
$graph = new Graph\Graph(310, 250, 'auto');
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(60, 30, 20, 40);
|
||||
$graph->yaxis->SetTitleMargin(45);
|
||||
$graph->yaxis->scale->SetGrace(30);
|
||||
$graph->SetShadow();
|
||||
|
||||
// Turn the tickmarks
|
||||
$graph->xaxis->SetTickSide(SIDE_DOWN);
|
||||
$graph->yaxis->SetTickSide(SIDE_LEFT);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
|
||||
// Create targets for the image maps. One for each column
|
||||
$targ = array("bar_clsmex1.php#1", "bar_clsmex1.php#2", "bar_clsmex1.php#3", "bar_clsmex1.php#4", "bar_clsmex1.php#5", "bar_clsmex1.php#6");
|
||||
$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d");
|
||||
$bplot->SetCSIMTargets($targ, $alts);
|
||||
$bplot->SetFillColor("orange");
|
||||
|
||||
// Use a shadow on the bar graphs (just use the default settings)
|
||||
$bplot->SetShadow();
|
||||
$bplot->value->SetFormat(" $ %2.1f", 70);
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$bplot->value->SetColor("blue");
|
||||
$bplot->value->Show();
|
||||
|
||||
$graph->Add($bplot);
|
||||
|
||||
$graph->title->Set("Image maps barex1");
|
||||
$graph->xaxis->title->Set("X-title");
|
||||
$graph->yaxis->title->Set("Y-title");
|
||||
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Send back the HTML page which will call this script again
|
||||
// to retrieve the image.
|
||||
$graph->StrokeCSIM();
|
||||
@@ -1,49 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$data1y = array(12, 8, 19, 3, 10, 5);
|
||||
$data2y = array(8, 2, 12, 7, 14, 4);
|
||||
|
||||
// Create the graph. These two calls are always required
|
||||
$graph = new Graph\Graph(310, 200, 'auto');
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(40, 30, 20, 40);
|
||||
$graph->SetShadow();
|
||||
|
||||
// Create the bar plots
|
||||
$b1plot = new Plot\BarPlot($data1y);
|
||||
$b1plot->SetFillColor("orange");
|
||||
$targ = array("bar_clsmex2.php#1", "bar_clsmex2.php#2", "bar_clsmex2.php#3",
|
||||
"bar_clsmex2.php#4", "bar_clsmex2.php#5", "bar_clsmex2.php#6");
|
||||
$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d");
|
||||
$b1plot->SetCSIMTargets($targ, $alts);
|
||||
|
||||
$b2plot = new Plot\BarPlot($data2y);
|
||||
$b2plot->SetFillColor("blue");
|
||||
$targ = array("bar_clsmex2.php#7", "bar_clsmex2.php#8", "bar_clsmex2.php#9",
|
||||
"bar_clsmex2.php#10", "bar_clsmex2.php#11", "bar_clsmex2.php#12");
|
||||
$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d");
|
||||
$b2plot->SetCSIMTargets($targ, $alts);
|
||||
|
||||
// Create the grouped bar plot
|
||||
$abplot = new Plot\AccBarPlot(array($b1plot, $b2plot));
|
||||
|
||||
$abplot->SetShadow();
|
||||
$abplot->value->Show();
|
||||
|
||||
// ...and add it to the graPH
|
||||
$graph->Add($abplot);
|
||||
|
||||
$graph->title->Set("Image map barex2");
|
||||
$graph->xaxis->title->Set("X-title");
|
||||
$graph->yaxis->title->Set("Y-title");
|
||||
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Send back the HTML page which will call this script again
|
||||
// to retrieve the image.
|
||||
$graph->StrokeCSIM();
|
||||
@@ -1,87 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// $Id: bar_csimex3.php,v 1.3 2002/08/31 20:03:46 aditus Exp $
|
||||
// Horiontal bar graph with image maps
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$data1y = array(5, 8, 19, 3, 10, 5);
|
||||
$data2y = array(12, 2, 12, 7, 14, 4);
|
||||
|
||||
// Setup the basic parameters for the graph
|
||||
$graph = new Graph\Graph(400, 700);
|
||||
$graph->SetAngle(90);
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// The negative margins are necessary since we
|
||||
// have rotated the image 90 degress and shifted the
|
||||
// meaning of width, and height. This means that the
|
||||
// left and right margins now becomes top and bottom
|
||||
// calculated with the image width and not the height.
|
||||
$graph->img->SetMargin(-80, -80, 210, 210);
|
||||
|
||||
$graph->SetMarginColor('white');
|
||||
|
||||
// Setup title for graph
|
||||
$graph->title->Set('Horizontal bar graph');
|
||||
$graph->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
$graph->subtitle->Set("With image map\nNote: The URL just points back to this image");
|
||||
|
||||
// Setup X-axis.
|
||||
$graph->xaxis->SetTitle("X-title", 'center');
|
||||
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->xaxis->title->SetAngle(90);
|
||||
$graph->xaxis->SetTitleMargin(30);
|
||||
$graph->xaxis->SetLabelMargin(15);
|
||||
$graph->xaxis->SetLabelAlign('right', 'center');
|
||||
|
||||
// Setup Y-axis
|
||||
|
||||
// First we want it at the bottom, i.e. the 'max' value of the
|
||||
// x-axis
|
||||
$graph->yaxis->SetPos('max');
|
||||
|
||||
// Arrange the title
|
||||
$graph->yaxis->SetTitle("Turnaround (mkr)", 'center');
|
||||
$graph->yaxis->SetTitleSide(SIDE_RIGHT);
|
||||
$graph->yaxis->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
$graph->yaxis->title->SetAngle(0);
|
||||
$graph->yaxis->title->Align('center', 'top');
|
||||
$graph->yaxis->SetTitleMargin(30);
|
||||
|
||||
// Arrange the labels
|
||||
$graph->yaxis->SetLabelSide(SIDE_RIGHT);
|
||||
$graph->yaxis->SetLabelAlign('center', 'top');
|
||||
|
||||
// Create the bar plots with image maps
|
||||
$b1plot = new Plot\BarPlot($data1y);
|
||||
$b1plot->SetFillColor("orange");
|
||||
$targ = array("bar_clsmex2.php#1", "bar_clsmex2.php#2", "bar_clsmex2.php#3",
|
||||
"bar_clsmex2.php#4", "bar_clsmex2.php#5", "bar_clsmex2.php#6");
|
||||
$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d");
|
||||
$b1plot->SetCSIMTargets($targ, $alts);
|
||||
|
||||
$b2plot = new Plot\BarPlot($data2y);
|
||||
$b2plot->SetFillColor("blue");
|
||||
$targ = array("bar_clsmex2.php#7", "bar_clsmex2.php#8", "bar_clsmex2.php#9",
|
||||
"bar_clsmex2.php#10", "bar_clsmex2.php#11", "bar_clsmex2.php#12");
|
||||
$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d");
|
||||
$b2plot->SetCSIMTargets($targ, $alts);
|
||||
|
||||
// Create the accumulated bar plot
|
||||
$abplot = new Plot\AccBarPlot(array($b1plot, $b2plot));
|
||||
$abplot->SetShadow();
|
||||
|
||||
// We want to display the value of each bar at the top
|
||||
$abplot->value->Show();
|
||||
$abplot->value->SetFont(FF_FONT1, FS_NORMAL);
|
||||
$abplot->value->SetAlign('left', 'center');
|
||||
$abplot->value->SetColor("black", "darkred");
|
||||
$abplot->value->SetFormat('%.1f mkr');
|
||||
|
||||
// ...and add it to the graph
|
||||
$graph->Add($abplot);
|
||||
|
||||
// Send back the HTML page which will call this script again
|
||||
// to retrieve the image.
|
||||
$graph->StrokeCSIM();
|
||||
@@ -1,7 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
if (empty($_GET['id'])) {
|
||||
echo 'Incorrect argument(s) to script <b>'.basename(__FILE__).'</b>.';
|
||||
} else {
|
||||
echo 'Some details on bar with id='.$_GET['id'];
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some random data to plot
|
||||
$datay = array(12, 26, 9, 17, 31);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(400, 250);
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
|
||||
// Create targets for the image maps so that the details are opened in a separate window
|
||||
$fmtStr = "javascript:window.open('barcsim_details.php?id=%d','_new','width=500,height=300');void(0)";
|
||||
$n = count($datay);
|
||||
$targ = array();
|
||||
$alts = array();
|
||||
for ($i = 0; $i < $n; ++$i) {
|
||||
$targ[$i] = sprintf($fmtStr, $i + 1);
|
||||
$alts[$i] = 'val=%d';
|
||||
// Note: The format placeholder val=%d will be replaced by the actual value in the ouput HTML by the
|
||||
// library so that when the user hoovers the mouse over the bar the actual numerical value of the bar
|
||||
// will be dísplayed
|
||||
}
|
||||
$bplot->SetCSIMTargets($targ, $alts);
|
||||
|
||||
// Add plot to graph
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Setup the title, also wih a CSIM area
|
||||
$graph->title->Set("CSIM with popup windows");
|
||||
$graph->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
// Assume we can give more details on the graph
|
||||
$graph->title->SetCSIMTarget(sprintf($fmtStr, -1), 'Title for Bar');
|
||||
|
||||
// Send back the HTML page which will call this script again to retrieve the image.
|
||||
$graph->StrokeCSIM();
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$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\Graph(400, 300);
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Create a bar plots
|
||||
$bar1 = new Plot\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();
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// Example for use of JpGraph,
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(0.13, 0.25, 0.21, 0.35, 0.31, 0.06);
|
||||
$datax = array("January", "February", "March", "April", "May", "June");
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(400, 240);
|
||||
$graph->img->SetMargin(60, 20, 35, 75);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMarginColor("lightblue:1.1");
|
||||
$graph->SetShadow();
|
||||
|
||||
// Set up the title for the graph
|
||||
$graph->title->Set("Bar gradient with left reflection");
|
||||
$graph->title->SetMargin(8);
|
||||
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12);
|
||||
$graph->title->SetColor("darkred");
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 10);
|
||||
$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 10);
|
||||
|
||||
// Show 0 label on Y-axis (default is not to show)
|
||||
$graph->yscale->ticks->SupressZeroLabel(false);
|
||||
|
||||
// Setup X-axis labels
|
||||
$graph->xaxis->SetTickLabels($datax);
|
||||
$graph->xaxis->SetLabelAngle(50);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy:0.9", "navy:1.85", GRAD_LEFT_REFLECTION);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("white");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,48 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// Example for use of JpGraph,
|
||||
// ljp, 01/03/01 20:32
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(-0.13, 0.25, -0.21, 0.35, 0.31, 0.04);
|
||||
$datax = array("Jan", "Feb", "Mar", "Apr", "May", "June");
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(400, 200);
|
||||
$graph->img->SetMargin(60, 20, 30, 50);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMarginColor("silver");
|
||||
$graph->SetShadow();
|
||||
|
||||
// Set up the title for the graph
|
||||
$graph->title->Set("Example negative bars");
|
||||
$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 18);
|
||||
$graph->title->SetColor("darkred");
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 12);
|
||||
$graph->xaxis->SetColor("black", "red");
|
||||
$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 11);
|
||||
|
||||
// Show 0 label on Y-axis (default is not to show)
|
||||
$graph->yscale->ticks->SupressZeroLabel(false);
|
||||
|
||||
// Setup X-axis labels
|
||||
$graph->xaxis->SetTickLabels($datax);
|
||||
$graph->xaxis->SetLabelAngle(50);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy", "steelblue", GRAD_MIDVER);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,50 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// Example for use of JpGraph,
|
||||
// ljp, 01/03/01 20:32
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(-0.13, 0.25, -0.21, 0.35, 0.31, 0.04);
|
||||
$datax = array("Jan", "Feb", "Mar", "Apr", "May", "June");
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(400, 200);
|
||||
$graph->img->SetMargin(60, 20, 30, 50);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMarginColor("silver");
|
||||
$graph->SetShadow();
|
||||
|
||||
// Set up the title for the graph
|
||||
$graph->title->Set("Example negative bars");
|
||||
$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 16);
|
||||
$graph->title->SetColor("darkred");
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 10);
|
||||
$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 10);
|
||||
|
||||
// Show 0 label on Y-axis (default is not to show)
|
||||
$graph->yscale->ticks->SupressZeroLabel(false);
|
||||
|
||||
// Setup X-axis labels
|
||||
$graph->xaxis->SetTickLabels($datax);
|
||||
$graph->xaxis->SetLabelAngle(50);
|
||||
|
||||
// Set X-axis at the minimum value of Y-axis (default will be at 0)
|
||||
$graph->xaxis->SetPos("min"); // "min" will position the x-axis at the minimum value of the Y-axis
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy", "steelblue", GRAD_MIDVER);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// Example for use of JpGraph,
|
||||
// ljp, 01/03/01 19:44
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(0.3031, 0.3044, 0.3049, 0.3040, 0.3024, 0.3047);
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(400, 200);
|
||||
$graph->img->SetMargin(60, 30, 30, 40);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMarginColor("teal");
|
||||
$graph->SetShadow();
|
||||
|
||||
// Set up the title for the graph
|
||||
$graph->title->Set("Bargraph with small variations");
|
||||
$graph->title->SetColor("white");
|
||||
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12);
|
||||
|
||||
// Setup color for axis and labels
|
||||
$graph->xaxis->SetColor("black", "white");
|
||||
$graph->yaxis->SetColor("black", "white");
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 10);
|
||||
$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 10);
|
||||
|
||||
// Setup X-axis title (color & font)
|
||||
$graph->xaxis->title->Set("X-axis");
|
||||
$graph->xaxis->title->SetColor("white");
|
||||
$graph->xaxis->title->SetFont(FF_VERDANA, FS_BOLD, 10);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$tcol = array(100, 100, 255);
|
||||
$fcol = array(255, 100, 100);
|
||||
$bplot->SetFillGradient($fcol, $tcol, GRAD_HOR);
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// Example for use of JpGraph,
|
||||
// ljp, 01/03/01 19:44
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(0.3031, 0.3044, 0.3049, 0.3040, 0.3024, 0.3047);
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(400, 200);
|
||||
$graph->img->SetMargin(60, 30, 30, 40);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMarginColor("teal");
|
||||
$graph->SetShadow();
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// This is how you make the bar graph start from something other than 0
|
||||
$bplot->SetYMin(0.302);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$tcol = array(100, 100, 255);
|
||||
$fcol = array(255, 100, 100);
|
||||
$bplot->SetFillGradient($fcol, $tcol, GRAD_HOR);
|
||||
$bplot->SetFillColor("orange");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Set up the title for the graph
|
||||
$graph->title->Set("Bargraph which doesn't start from y=0");
|
||||
$graph->title->SetColor("yellow");
|
||||
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 12);
|
||||
|
||||
// Setup color for axis and labels
|
||||
$graph->xaxis->SetColor("black", "white");
|
||||
$graph->yaxis->SetColor("black", "white");
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 10);
|
||||
$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 10);
|
||||
|
||||
// Setup X-axis title (color & font)
|
||||
$graph->xaxis->title->Set("X-axis");
|
||||
$graph->xaxis->title->SetColor("white");
|
||||
$graph->xaxis->title->SetFont(FF_VERDANA, FS_BOLD, 10);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// Example for use of JpGraph,
|
||||
// ljp, 01/03/01 20:32
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(-0.13, 0.25, -0.21, 0.35, 0.31, 0.04);
|
||||
$datax = array("Jan", "Feb", "Mar", "Apr", "May", "June");
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(500, 200);
|
||||
$graph->img->SetMargin(60, 150, 30, 50);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMarginColor("silver");
|
||||
$graph->SetShadow();
|
||||
|
||||
// Set up the title for the graph
|
||||
$graph->title->Set("Example negative bars");
|
||||
$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 16);
|
||||
$graph->title->SetColor("darkred");
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 10);
|
||||
$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 10);
|
||||
|
||||
// Show 0 label on Y-axis (default is not to show)
|
||||
$graph->yscale->ticks->SupressZeroLabel(false);
|
||||
|
||||
// Setup X-axis labels
|
||||
$graph->xaxis->SetTickLabels($datax);
|
||||
$graph->xaxis->SetLabelAngle(50);
|
||||
|
||||
// Set X-axis at the minimum value of Y-axis (default will be at 0)
|
||||
$graph->xaxis->SetPos("min"); // "min" will position the x-axis at the minimum value of the Y-axis
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
$bplot->SetLegend("Result 1999", "blue");
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy", "steelblue", GRAD_MIDVER);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(4, 8, 6);
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(25, 15, 25, 25);
|
||||
|
||||
$graph->title->Set('"GRAD_MIDVER"');
|
||||
$graph->title->SetColor('darkred');
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->yaxis->SetFont(FF_FONT1);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_MIDVER);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(4, 8, 6);
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(25, 15, 25, 25);
|
||||
|
||||
$graph->title->Set('"GRAD_MIDHOR"');
|
||||
$graph->title->SetColor('darkred');
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->yaxis->SetFont(FF_FONT1);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_MIDHOR);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(4, 8, 6);
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(25, 15, 25, 25);
|
||||
|
||||
$graph->title->Set('"GRAD_HOR"');
|
||||
$graph->title->SetColor('darkred');
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->yaxis->SetFont(FF_FONT1);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_HOR);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(4, 8, 6);
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(25, 15, 25, 25);
|
||||
|
||||
$graph->title->Set('"GRAD_VER"');
|
||||
$graph->title->SetColor('darkred');
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->yaxis->SetFont(FF_FONT1);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_VER);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(4, 8, 6);
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(25, 15, 25, 25);
|
||||
|
||||
$graph->title->Set('"GRAD_WIDE_MIDVER"');
|
||||
$graph->title->SetColor('darkred');
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->yaxis->SetFont(FF_FONT1);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_WIDE_MIDVER);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(4, 8, 6);
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(25, 15, 25, 25);
|
||||
|
||||
$graph->title->Set('"GRAD_WIDE_MIDHOR"');
|
||||
$graph->title->SetColor('darkred');
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->yaxis->SetFont(FF_FONT1);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_WIDE_MIDHOR);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(4, 8, 6);
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(25, 15, 25, 25);
|
||||
|
||||
$graph->title->Set('"GRAD_CENTER"');
|
||||
$graph->title->SetColor('darkred');
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->yaxis->SetFont(FF_FONT1);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient("navy", "lightsteelblue", GRAD_CENTER);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// We need some data
|
||||
$datay = array(4, 8, 6);
|
||||
|
||||
// Setup the graph.
|
||||
$graph = new Graph\Graph(200, 150);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(25, 15, 25, 25);
|
||||
|
||||
$graph->title->Set('"GRAD_RAISED_PANEL"');
|
||||
$graph->title->SetColor('darkred');
|
||||
|
||||
// Setup font for axis
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->yaxis->SetFont(FF_FONT1);
|
||||
|
||||
// Create the bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
// Setup color for gradient fill style
|
||||
$bplot->SetFillGradient('navy', 'orange', GRAD_RAISED_PANEL);
|
||||
|
||||
// Set color for the frame of each bar
|
||||
$bplot->SetColor("navy");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally send the graph to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,30 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
$datay = array(5, 3, 11, 6, 3);
|
||||
|
||||
$graph = new Graph\Graph(400, 300, 'auto');
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
$graph->title->Set('Images on top of bars');
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 13);
|
||||
|
||||
$graph->SetTitleBackground('lightblue:1.1', TITLEBKG_STYLE1, TITLEBKG_FRAME_BEVEL);
|
||||
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor("orange");
|
||||
$bplot->SetWidth(0.5);
|
||||
|
||||
$lplot = new Plot\LinePlot($datay);
|
||||
$lplot->SetColor('white@1');
|
||||
$lplot->SetBarCenter();
|
||||
$lplot->mark->SetType(MARK_IMG_LBALL, 'red');
|
||||
|
||||
$graph->Add($bplot);
|
||||
$graph->Add($lplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,48 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// $Id: barintex1.php,v 1.3 2002/07/11 23:27:28 aditus Exp $
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$datay = array(1, 1, 0.5);
|
||||
|
||||
// Create the graph and setup the basic parameters
|
||||
$graph = new Graph\Graph(460, 200, 'auto');
|
||||
$graph->img->SetMargin(40, 30, 30, 40);
|
||||
$graph->SetScale("textint");
|
||||
$graph->SetShadow();
|
||||
$graph->SetFrame(false); // No border around the graph
|
||||
|
||||
// Add some grace to the top so that the scale doesn't
|
||||
// end exactly at the max value.
|
||||
$graph->yaxis->scale->SetGrace(100);
|
||||
|
||||
// Setup X-axis labels
|
||||
$a = $gDateLocale->GetShortMonth();
|
||||
$graph->xaxis->SetTickLabels($a);
|
||||
$graph->xaxis->SetFont(FF_FONT2);
|
||||
|
||||
// Setup graph title ands fonts
|
||||
$graph->title->Set("Example of integer Y-scale");
|
||||
$graph->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
$graph->xaxis->title->Set("Year 2002");
|
||||
$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor("orange");
|
||||
$bplot->SetWidth(0.5);
|
||||
$bplot->SetShadow();
|
||||
|
||||
// Setup the values that are displayed on top of each bar
|
||||
$bplot->value->Show();
|
||||
// Must use TTF fonts if we want text at an arbitrary angle
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_BOLD);
|
||||
$bplot->value->SetAngle(45);
|
||||
// Black color for positive values and darkred for negative values
|
||||
$bplot->value->SetColor("black", "darkred");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally stroke the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$datay = array(3, 7, 19, 11, 4, 20);
|
||||
|
||||
// Create the graph and setup the basic parameters
|
||||
$graph = new Graph\Graph(350, 200, 'auto');
|
||||
$graph->img->SetMargin(40, 30, 40, 40);
|
||||
$graph->SetScale("textint");
|
||||
$graph->SetFrame(true, 'blue', 1);
|
||||
$graph->SetColor('lightblue');
|
||||
$graph->SetMarginColor('lightblue');
|
||||
|
||||
// Add some grace to the top so that the scale doesn't
|
||||
// end exactly at the max value.
|
||||
//$graph->yaxis->scale->SetGrace(20);
|
||||
|
||||
// Setup X-axis labels
|
||||
$a = $gDateLocale->GetShortMonth();
|
||||
$graph->xaxis->SetTickLabels($a);
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->xaxis->SetColor('darkblue', 'black');
|
||||
|
||||
// Stup "hidden" y-axis by given it the same color
|
||||
// as the background
|
||||
$graph->yaxis->SetColor('lightblue', 'darkblue');
|
||||
$graph->ygrid->SetColor('white');
|
||||
|
||||
// Setup graph title ands fonts
|
||||
$graph->title->Set('Example of integer Y-scale');
|
||||
$graph->subtitle->Set('(With "hidden" y-axis)');
|
||||
|
||||
$graph->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
$graph->xaxis->title->Set("Year 2002");
|
||||
$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor('darkblue');
|
||||
$bplot->SetColor('darkblue');
|
||||
$bplot->SetWidth(0.5);
|
||||
$bplot->SetShadow('darkgray');
|
||||
|
||||
// Setup the values that are displayed on top of each bar
|
||||
$bplot->value->Show();
|
||||
// Must use TTF fonts if we want text at an arbitrary angle
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8);
|
||||
$bplot->value->SetFormat('$%d');
|
||||
// Black color for positive values and darkred for negative values
|
||||
$bplot->value->SetColor("black", "darkred");
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally stroke the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$ydata = array(2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
|
||||
$ydata2 = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
|
||||
$targ = array("#1", "#2", "#3", "#4", "#5", "#6", "#7", "#8", "#9", "#10");
|
||||
$alt = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(300, 200);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(40, 20, 30, 40);
|
||||
$graph->title->Set("CSIM example with bar and line");
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Setup axis titles
|
||||
$graph->xaxis->title->Set("X-title");
|
||||
$graph->yaxis->title->Set("Y-title");
|
||||
|
||||
// Create the linear plot
|
||||
$lineplot = new Plot\LinePlot($ydata);
|
||||
$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
|
||||
$lineplot->mark->SetWidth(5);
|
||||
$lineplot->mark->SetColor('black');
|
||||
$lineplot->mark->SetFillColor('red');
|
||||
$lineplot->SetCSIMTargets($targ, $alt);
|
||||
|
||||
// Create line plot
|
||||
$barplot = new Plot\BarPlot($ydata2);
|
||||
$barplot->SetCSIMTargets($targ, $alt);
|
||||
|
||||
// Add the plots to the graph
|
||||
$graph->Add($lineplot);
|
||||
$graph->Add($barplot);
|
||||
|
||||
$graph->StrokeCSIM();
|
||||
@@ -1,75 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Some "random" data
|
||||
$ydata = array(10, 120, 80, 190, 260, 170, 60, 40, 20, 230);
|
||||
$ydata2 = array(10, 70, 40, 120, 200, 60, 80, 40, 20, 5);
|
||||
|
||||
// Get a list of month using the current locale
|
||||
$months = $gDateLocale->GetShortMonth();
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(300, 200);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetMarginColor('white');
|
||||
|
||||
// Adjust the margin slightly so that we use the
|
||||
// entire area (since we don't use a frame)
|
||||
$graph->SetMargin(30, 1, 20, 5);
|
||||
|
||||
// Box around plotarea
|
||||
$graph->SetBox();
|
||||
|
||||
// No frame around the image
|
||||
$graph->SetFrame(false);
|
||||
|
||||
// Setup the tab title
|
||||
$graph->tabtitle->Set('Year 2003');
|
||||
$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 10);
|
||||
|
||||
// Setup the X and Y grid
|
||||
$graph->ygrid->SetFill(true, '#[email protected]', '#[email protected]');
|
||||
$graph->ygrid->SetLineStyle('dashed');
|
||||
$graph->ygrid->SetColor('gray');
|
||||
$graph->xgrid->Show();
|
||||
$graph->xgrid->SetLineStyle('dashed');
|
||||
$graph->xgrid->SetColor('gray');
|
||||
|
||||
// Setup month as labels on the X-axis
|
||||
$graph->xaxis->SetTickLabels($months);
|
||||
$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 8);
|
||||
$graph->xaxis->SetLabelAngle(45);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($ydata);
|
||||
$bplot->SetWidth(0.6);
|
||||
$fcol = '#440000';
|
||||
$tcol = '#FF9090';
|
||||
|
||||
$bplot->SetFillGradient($fcol, $tcol, GRAD_LEFT_REFLECTION);
|
||||
|
||||
// Set line weigth to 0 so that there are no border
|
||||
// around each bar
|
||||
$bplot->SetWeight(0);
|
||||
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Create filled line plot
|
||||
$lplot = new Plot\LinePlot($ydata2);
|
||||
$lplot->SetFillColor('[email protected]');
|
||||
$lplot->SetColor('[email protected]');
|
||||
$lplot->SetBarCenter();
|
||||
|
||||
$lplot->mark->SetType(MARK_SQUARE);
|
||||
$lplot->mark->SetColor('[email protected]');
|
||||
$lplot->mark->SetFillColor('lightblue');
|
||||
$lplot->mark->SetSize(6);
|
||||
|
||||
$graph->Add($lplot);
|
||||
|
||||
// .. and finally send it back to the browser
|
||||
$graph->Stroke();
|
||||
@@ -1,98 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
//
|
||||
// Example of CSIM frequence bar that uses the cache
|
||||
//
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Utility function to calculate the accumulated frequence
|
||||
// for a set of values and ocurrences
|
||||
function accfreq($data)
|
||||
{
|
||||
rsort($data);
|
||||
$s = array_sum($data);
|
||||
$as = array($data[0]);
|
||||
$asp = array(100 * $as[0] / $s);
|
||||
$n = count($data);
|
||||
for ($i = 1; $i < $n; ++$i) {
|
||||
$as[$i] = $as[$i - 1] + $data[$i];
|
||||
$asp[$i] = 100.0 * $as[$i] / $s;
|
||||
}
|
||||
return $asp;
|
||||
}
|
||||
|
||||
// some data
|
||||
$data_freq = array(22, 20, 12, 10, 5, 4, 2);
|
||||
$data_accfreq = accfreq($data_freq);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(350, 250);
|
||||
|
||||
// We need to make this extra call for CSIM scripts
|
||||
// that make use of the cache. If the cache contains this
|
||||
// graph the HTML wrapper will be returned and then the
|
||||
// method will call exit() and hence NO LINES AFTER THIS
|
||||
// CALL WILL BE EXECUTED.
|
||||
// $graph->CheckCSIMCache('auto');
|
||||
|
||||
// Setup some basic graph parameters
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetY2Scale('lin', 0, 100);
|
||||
$graph->img->SetMargin(50, 70, 30, 40);
|
||||
$graph->yaxis->SetTitleMargin(30);
|
||||
$graph->SetMarginColor('#EEEEEE');
|
||||
|
||||
// Setup titles and fonts
|
||||
$graph->title->Set("Frequence plot");
|
||||
$graph->xaxis->title->Set("X-title");
|
||||
$graph->yaxis->title->Set("Y-title");
|
||||
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Turn the tickmarks
|
||||
$graph->xaxis->SetTickSide(SIDE_DOWN);
|
||||
$graph->yaxis->SetTickSide(SIDE_LEFT);
|
||||
|
||||
$graph->y2axis->SetTickSide(SIDE_RIGHT);
|
||||
$graph->y2axis->SetColor('black', 'blue');
|
||||
$graph->y2axis->SetLabelFormat('%3d.0%%');
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($data_freq);
|
||||
|
||||
// Create targets and alt texts for the image maps. One for each bar
|
||||
// (In this example this is just "dummy" targets)
|
||||
$targ = array("#1", "#2", "#3", "#4", "#5", "#6", "#7");
|
||||
$alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d");
|
||||
$bplot->SetCSIMTargets($targ, $alts);
|
||||
|
||||
// Create accumulative graph
|
||||
$lplot = new Plot\LinePlot($data_accfreq);
|
||||
|
||||
// We want the line plot data point in the middle of the bars
|
||||
$lplot->SetBarCenter();
|
||||
|
||||
// Use transperancy
|
||||
$lplot->SetFillColor('[email protected]');
|
||||
$lplot->SetColor('[email protected]');
|
||||
//$lplot->SetColor('blue');
|
||||
$graph->AddY2($lplot);
|
||||
|
||||
// Setup the bars
|
||||
$bplot->SetFillColor("[email protected]");
|
||||
$bplot->SetValuePos('center');
|
||||
$bplot->value->SetFormat("%d");
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$bplot->value->Show();
|
||||
|
||||
// Add it to the graph
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Send back the HTML page which will call this script again
|
||||
// to retrieve the image.
|
||||
$graph->StrokeCSIM();
|
||||
@@ -1,84 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
//
|
||||
// Example of frequence bar
|
||||
//
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
// Utility function to calculate the accumulated frequence
|
||||
// for a set of values and ocurrences
|
||||
function accfreq($data)
|
||||
{
|
||||
rsort($data);
|
||||
$s = array_sum($data);
|
||||
$as = array($data[0]);
|
||||
$asp = array(100 * $as[0] / $s);
|
||||
$n = count($data);
|
||||
for ($i = 1; $i < $n; ++$i) {
|
||||
$as[$i] = $as[$i - 1] + $data[$i];
|
||||
$asp[$i] = 100.0 * $as[$i] / $s;
|
||||
}
|
||||
return $asp;
|
||||
}
|
||||
|
||||
// some data
|
||||
$data_freq = array(22, 20, 12, 10, 5, 4, 2);
|
||||
$data_accfreq = accfreq($data_freq);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(350, 250);
|
||||
|
||||
// Setup some basic graph parameters
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetY2Scale('lin', 0, 100);
|
||||
$graph->img->SetMargin(50, 70, 30, 40);
|
||||
$graph->yaxis->SetTitleMargin(30);
|
||||
$graph->SetMarginColor('#EEEEEE');
|
||||
|
||||
// Setup titles and fonts
|
||||
$graph->title->Set("Frequence plot");
|
||||
$graph->xaxis->title->Set("X-title");
|
||||
$graph->yaxis->title->Set("Y-title");
|
||||
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Turn the tickmarks
|
||||
$graph->xaxis->SetTickSide(SIDE_DOWN);
|
||||
$graph->yaxis->SetTickSide(SIDE_LEFT);
|
||||
|
||||
$graph->y2axis->SetTickSide(SIDE_RIGHT);
|
||||
$graph->y2axis->SetColor('black', 'blue');
|
||||
$graph->y2axis->SetLabelFormat('%3d.0%%');
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($data_freq);
|
||||
|
||||
// Create accumulative graph
|
||||
$lplot = new Plot\LinePlot($data_accfreq);
|
||||
|
||||
// We want the line plot data point in the middle of the bars
|
||||
$lplot->SetBarCenter();
|
||||
|
||||
// Use transperancy
|
||||
$lplot->SetFillColor('[email protected]');
|
||||
$lplot->SetColor('[email protected]');
|
||||
$graph->AddY2($lplot);
|
||||
|
||||
// Setup the bars
|
||||
$bplot->SetFillColor("[email protected]");
|
||||
$bplot->SetValuePos('center');
|
||||
$bplot->value->SetFormat("%d");
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 9);
|
||||
$bplot->value->Show();
|
||||
|
||||
// Add it to the graph
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Send back the HTML page which will call this script again
|
||||
// to retrieve the image.
|
||||
$graph->Stroke();
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
|
||||
$datay = array(2, 3, 5, 8.5, 11.5, 6, 3);
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(350, 300);
|
||||
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
$graph->SetMarginColor('navy:1.9');
|
||||
$graph->SetBox();
|
||||
|
||||
$graph->title->Set('Bar Pattern');
|
||||
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 20);
|
||||
|
||||
$graph->SetTitleBackground('lightblue:1.3', TITLEBKG_STYLE2, TITLEBKG_FRAME_BEVEL);
|
||||
$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED, 'lightblue', 'blue');
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor('darkorange');
|
||||
$bplot->SetWidth(0.6);
|
||||
|
||||
$bplot->SetPattern(PATTERN_CROSS1, 'navy');
|
||||
|
||||
$graph->Add($bplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,65 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Callback function for Y-scale to get 1000 separator on labels
|
||||
function separator1000($aVal)
|
||||
{
|
||||
return number_format($aVal);
|
||||
}
|
||||
|
||||
function separator1000_usd($aVal)
|
||||
{
|
||||
return '$' . number_format($aVal);
|
||||
}
|
||||
|
||||
// Some data
|
||||
$datay = array(120567, 134013, 192000, 87000);
|
||||
|
||||
// Create the graph and setup the basic parameters
|
||||
$graph = new Graph\Graph(500, 300, 'auto');
|
||||
$graph->img->SetMargin(80, 30, 30, 40);
|
||||
$graph->SetScale('textint');
|
||||
$graph->SetShadow();
|
||||
$graph->SetFrame(false); // No border around the graph
|
||||
|
||||
// Add some grace to the top so that the scale doesn't
|
||||
// end exactly at the max value.
|
||||
// The grace value is the percetage of additional scale
|
||||
// value we add. Specifying 50 means that we add 50% of the
|
||||
// max value
|
||||
$graph->yaxis->scale->SetGrace(50);
|
||||
$graph->yaxis->SetLabelFormatCallback('separator1000');
|
||||
|
||||
// Setup X-axis labels
|
||||
$a = $gDateLocale->GetShortMonth();
|
||||
$graph->xaxis->SetTickLabels($a);
|
||||
$graph->xaxis->SetFont(FF_FONT2);
|
||||
|
||||
// Setup graph title ands fonts
|
||||
$graph->title->Set('Example of Y-scale callback formatting');
|
||||
$graph->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
$graph->xaxis->title->Set('Year 2002');
|
||||
$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor('orange');
|
||||
$bplot->SetWidth(0.5);
|
||||
$bplot->SetShadow();
|
||||
|
||||
// Setup the values that are displayed on top of each bar
|
||||
$bplot->value->Show();
|
||||
|
||||
// Must use TTF fonts if we want text at an arbitrary angle
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_BOLD);
|
||||
$bplot->value->SetAngle(45);
|
||||
$bplot->value->SetFormatCallback('separator1000_usd');
|
||||
|
||||
// Black color for positive values and darkred for negative values
|
||||
$bplot->value->SetColor('black', 'darkred');
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally stroke the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$databary = array(12, 7, 16, 5, 7, 14, 9, 3);
|
||||
|
||||
// new Graph\Graph with a drop shadow
|
||||
$graph = new Graph\Graph(300, 200);
|
||||
$graph->SetShadow();
|
||||
|
||||
// Use a "text" X-scale
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Set title and subtitle
|
||||
$graph->title->Set("Elementary barplot with a text scale");
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Create the bar plot
|
||||
$b1 = new Plot\BarPlot($databary);
|
||||
$b1->SetLegend("Temperature");
|
||||
//$b1->SetAbsWidth(6);
|
||||
//$b1->SetShadow();
|
||||
|
||||
// The order the plots are added determines who's ontop
|
||||
$graph->Add($b1);
|
||||
|
||||
// Finally output the image
|
||||
$graph->Stroke();
|
||||
@@ -1,86 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// A medium complex example of JpGraph
|
||||
// Note: You can create a graph in far fewwr lines of code if you are
|
||||
// willing to go with the defaults. This is an illustrative example of
|
||||
// some of the capabilities of JpGraph.
|
||||
|
||||
require_once '../../vendor/autoload.php';
|
||||
require_once 'jpgraph/jpgraph_line.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$month = array(
|
||||
"Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec");
|
||||
|
||||
// Create some datapoints
|
||||
$steps = 100;
|
||||
for ($i = 0; $i < $steps; ++$i) {
|
||||
$databarx[] = sprintf("198%d %s", floor($i / 12), $month[$i % 12]);
|
||||
$datay[$i] = log(pow($i, $i / 10) + 1) * sin($i / 15) + 35;
|
||||
if ($i % 6 == 0 && $i < $steps - 6) {
|
||||
$databary[] = abs(25 * sin($i) + 5);
|
||||
} else {
|
||||
$databary[] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// new Graph\Graph with a background image and drop shadow
|
||||
$graph = new Graph\Graph(450, 300);
|
||||
$graph->SetBackgroundImage("tiger_bkg.png", BGIMG_FILLFRAME);
|
||||
$graph->SetShadow();
|
||||
|
||||
// Use text X-scale so we can text labels on the X-axis
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Y2-axis is linear
|
||||
$graph->SetY2Scale("lin");
|
||||
|
||||
// Color the two Y-axis to make them easier to associate
|
||||
// to the corresponding plot (we keep the axis black though)
|
||||
$graph->yaxis->SetColor("black", "red");
|
||||
$graph->y2axis->SetColor("black", "orange");
|
||||
|
||||
// Set title and subtitle
|
||||
$graph->title->Set("Combined bar and line plot");
|
||||
$graph->subtitle->Set("100 data points, X-Scale: 'text'");
|
||||
|
||||
// Use built in font (don't need TTF support)
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Make the margin around the plot a little bit bigger then default
|
||||
$graph->img->SetMargin(40, 140, 40, 80);
|
||||
|
||||
// Slightly adjust the legend from it's default position in the
|
||||
// top right corner to middle right side
|
||||
$graph->legend->Pos(0.03, 0.5, "right", "center");
|
||||
|
||||
// Display every 6:th tickmark
|
||||
$graph->xaxis->SetTextTickInterval(6);
|
||||
|
||||
// Label every 2:nd tick mark
|
||||
$graph->xaxis->SetTextLabelInterval(2);
|
||||
|
||||
// Setup the labels
|
||||
$graph->xaxis->SetTickLabels($databarx);
|
||||
$graph->xaxis->SetLabelAngle(90);
|
||||
|
||||
// Create a red line plot
|
||||
$p1 = new Plot\LinePlot($datay);
|
||||
$p1->SetColor("red");
|
||||
$p1->SetLegend("Pressure");
|
||||
|
||||
// Create the bar plot
|
||||
$b1 = new Plot\BarPlot($databary);
|
||||
$b1->SetLegend("Temperature");
|
||||
$b1->SetFillColor("orange");
|
||||
$b1->SetAbsWidth(8);
|
||||
|
||||
// Drop shadow on bars adjust the default values a little bit
|
||||
$b1->SetShadow("steelblue", 2, 2);
|
||||
|
||||
// The order the plots are added determines who's ontop
|
||||
$graph->Add($p1);
|
||||
$graph->AddY2($b1);
|
||||
|
||||
// Finally output the image
|
||||
$graph->Stroke();
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$databary = array(12, 7, 16, 6, 7, 14, 9, 3);
|
||||
$months = $gDateLocale->GetShortMonth();
|
||||
|
||||
// new Graph\Graph with a drop shadow
|
||||
$graph = new Graph\Graph(300, 200, 'auto');
|
||||
$graph->SetShadow();
|
||||
|
||||
// Use a "text" X-scale
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Specify X-labels
|
||||
$graph->xaxis->SetTickLabels($months);
|
||||
|
||||
// Set title and subtitle
|
||||
$graph->title->Set("Textscale with specified labels");
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Create the bar plot
|
||||
$b1 = new Plot\BarPlot($databary);
|
||||
$b1->SetLegend("Temperature");
|
||||
|
||||
//$b1->SetAbsWidth(6);
|
||||
//$b1->SetShadow();
|
||||
|
||||
// The order the plots are added determines who's ontop
|
||||
$graph->Add($b1);
|
||||
|
||||
// Finally output the image
|
||||
$graph->Stroke();
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$months = $gDateLocale->GetShortMonth();
|
||||
|
||||
srand((double) microtime() * 1000000);
|
||||
for ($i = 0; $i < 25; ++$i) {
|
||||
$databary[] = rand(1, 50);
|
||||
$databarx[] = $months[$i % 12];
|
||||
}
|
||||
|
||||
// new Graph\Graph with a drop shadow
|
||||
$graph = new Graph\Graph(300, 200, 'auto');
|
||||
$graph->SetShadow();
|
||||
|
||||
// Use a "text" X-scale
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Specify X-labels
|
||||
$graph->xaxis->SetTickLabels($databarx);
|
||||
|
||||
// Set title and subtitle
|
||||
$graph->title->Set("Bar tutorial example 3");
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Create the bar plot
|
||||
$b1 = new Plot\BarPlot($databary);
|
||||
$b1->SetLegend("Temperature");
|
||||
//$b1->SetAbsWidth(6);
|
||||
//$b1->SetShadow();
|
||||
|
||||
// The order the plots are added determines who's ontop
|
||||
$graph->Add($b1);
|
||||
|
||||
// Finally output the image
|
||||
$graph->Stroke();
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$months = $gDateLocale->GetShortMonth();
|
||||
|
||||
srand((double) microtime() * 1000000);
|
||||
for ($i = 0; $i < 25; ++$i) {
|
||||
$databary[] = rand(1, 50);
|
||||
$databarx[] = $months[$i % 12];
|
||||
}
|
||||
|
||||
// new Graph\Graph with a drop shadow
|
||||
$graph = new Graph\Graph(300, 200, 'auto');
|
||||
$graph->SetShadow();
|
||||
|
||||
// Use a "text" X-scale
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Specify X-labels
|
||||
//$databarx = array('tXi','','','xxx','','','iXii','','','OOO','','','tOO');
|
||||
$graph->xaxis->SetFont(FF_FONT1, FS_NORMAL);
|
||||
$graph->xaxis->SetTickLabels($databarx);
|
||||
$graph->xaxis->SetTextLabelInterval(3);
|
||||
|
||||
// Set title and subtitle
|
||||
$graph->title->Set("Displaying only every third label");
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Create the bar plot
|
||||
$b1 = new Plot\BarPlot($databary);
|
||||
$b1->SetLegend("Temperature");
|
||||
//$b1->SetAbsWidth(6);
|
||||
//$b1->SetShadow();
|
||||
|
||||
// The order the plots are added determines who's ontop
|
||||
$graph->Add($b1);
|
||||
|
||||
// Finally output the image
|
||||
$graph->Stroke();
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$months = $gDateLocale->GetShortMonth();
|
||||
|
||||
srand((double) microtime() * 1000000);
|
||||
for ($i = 0; $i < 25; ++$i) {
|
||||
$databary[] = rand(1, 50);
|
||||
$databarx[] = $months[$i % 12];
|
||||
}
|
||||
|
||||
// new Graph\Graph with a drop shadow
|
||||
$graph = new Graph\Graph(300, 200, 'auto');
|
||||
$graph->SetShadow();
|
||||
|
||||
// Use a "text" X-scale
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Specify X-labels
|
||||
$graph->xaxis->SetTickLabels($databarx);
|
||||
$graph->xaxis->SetTextLabelInterval(1);
|
||||
$graph->xaxis->SetTextTickInterval(3);
|
||||
|
||||
// Set title and subtitle
|
||||
$graph->title->Set("Bar tutorial example 5");
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Create the bar plot
|
||||
$b1 = new Plot\BarPlot($databary);
|
||||
$b1->SetLegend("Temperature");
|
||||
$b1->SetWidth(0.4);
|
||||
|
||||
// The order the plots are added determines who's ontop
|
||||
$graph->Add($b1);
|
||||
|
||||
// Finally output the image
|
||||
$graph->Stroke();
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$months = $gDateLocale->GetShortMonth();
|
||||
srand((double) microtime() * 1000000);
|
||||
for ($i = 0; $i < 25; ++$i) {
|
||||
$databary[] = rand(1, 50);
|
||||
$databarx[] = $months[$i % 12];
|
||||
}
|
||||
|
||||
// new Graph\Graph with a drop shadow
|
||||
$graph = new Graph\Graph(300, 200, 'auto');
|
||||
$graph->SetShadow();
|
||||
|
||||
// Use a "text" X-scale
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Specify X-labels
|
||||
$graph->xaxis->SetTickLabels($databarx);
|
||||
$graph->xaxis->SetTextLabelInterval(3);
|
||||
|
||||
// Hide the tick marks
|
||||
$graph->xaxis->HideTicks();
|
||||
|
||||
// Set title and subtitle
|
||||
$graph->title->Set("Bar tutorial example 6");
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Create the bar plot
|
||||
$b1 = new Plot\BarPlot($databary);
|
||||
$b1->SetLegend("Temperature");
|
||||
$b1->SetWidth(0.4);
|
||||
|
||||
// The order the plots are added determines who's ontop
|
||||
$graph->Add($b1);
|
||||
|
||||
// Finally output the image
|
||||
$graph->Stroke();
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$datay = array(7, 19, 11, 4, 20);
|
||||
|
||||
// Create the graph and setup the basic parameters
|
||||
$graph = new Graph\Graph(300, 200, 'auto');
|
||||
$graph->img->SetMargin(40, 30, 40, 50);
|
||||
$graph->SetScale("textint");
|
||||
$graph->SetFrame(true, 'blue', 1);
|
||||
$graph->SetColor('lightblue');
|
||||
$graph->SetMarginColor('lightblue');
|
||||
|
||||
// Setup X-axis labels
|
||||
$a = $gDateLocale->GetShortMonth();
|
||||
$graph->xaxis->SetTickLabels($a);
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->xaxis->SetColor('darkblue', 'black');
|
||||
|
||||
// Setup "hidden" y-axis by given it the same color
|
||||
// as the background (this could also be done by setting the weight
|
||||
// to zero)
|
||||
$graph->yaxis->SetColor('lightblue', 'darkblue');
|
||||
$graph->ygrid->SetColor('white');
|
||||
|
||||
// Setup graph title ands fonts
|
||||
$graph->title->Set('Using grace = 0');
|
||||
$graph->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
$graph->xaxis->SetTitle('Year 2002', 'center');
|
||||
$graph->xaxis->SetTitleMargin(10);
|
||||
$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
|
||||
// Add some grace to the top so that the scale doesn't
|
||||
// end exactly at the max value.
|
||||
$graph->yaxis->scale->SetGrace(0);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor('darkblue');
|
||||
$bplot->SetColor('darkblue');
|
||||
$bplot->SetWidth(0.5);
|
||||
$bplot->SetShadow('darkgray');
|
||||
|
||||
// Setup the values that are displayed on top of each bar
|
||||
// Must use TTF fonts if we want text at an arbitrary angle
|
||||
$bplot->value->Show();
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8);
|
||||
$bplot->value->SetFormat('$%d');
|
||||
$bplot->value->SetColor('darkred');
|
||||
$bplot->value->SetAngle(45);
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally stroke the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$datay = array(7, 19, 11, 4, 20);
|
||||
|
||||
// Create the graph and setup the basic parameters
|
||||
$graph = new Graph\Graph(300, 200, 'auto');
|
||||
$graph->img->SetMargin(40, 30, 40, 50);
|
||||
$graph->SetScale("textint");
|
||||
$graph->SetFrame(true, 'blue', 1);
|
||||
$graph->SetColor('lightblue');
|
||||
$graph->SetMarginColor('lightblue');
|
||||
|
||||
// Setup X-axis labels
|
||||
$a = $gDateLocale->GetShortMonth();
|
||||
$graph->xaxis->SetTickLabels($a);
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->xaxis->SetColor('darkblue', 'black');
|
||||
|
||||
// Setup "hidden" y-axis by given it the same color
|
||||
// as the background (this could also be done by setting the weight
|
||||
// to zero)
|
||||
$graph->yaxis->SetColor('lightblue', 'darkblue');
|
||||
$graph->ygrid->SetColor('white');
|
||||
|
||||
// Setup graph title ands fonts
|
||||
$graph->title->Set('Using grace = 10%');
|
||||
$graph->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
$graph->xaxis->SetTitle('Year 2002', 'center');
|
||||
$graph->xaxis->SetTitleMargin(10);
|
||||
$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
|
||||
// Add some grace to the top so that the scale doesn't
|
||||
// end exactly at the max value.
|
||||
$graph->yaxis->scale->SetGrace(10);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor('darkblue');
|
||||
$bplot->SetColor('darkblue');
|
||||
$bplot->SetWidth(0.5);
|
||||
$bplot->SetShadow('darkgray');
|
||||
|
||||
// Setup the values that are displayed on top of each bar
|
||||
// Must use TTF fonts if we want text at an arbitrary angle
|
||||
$bplot->value->Show();
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8);
|
||||
$bplot->value->SetFormat('$%d');
|
||||
$bplot->value->SetColor('darkred');
|
||||
$bplot->value->SetAngle(45);
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally stroke the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$datay = array(7, 19, 11, 4, 20);
|
||||
|
||||
// Create the graph and setup the basic parameters
|
||||
$graph = new Graph\Graph(300, 200, 'auto');
|
||||
$graph->img->SetMargin(40, 30, 40, 50);
|
||||
$graph->SetScale("textint");
|
||||
$graph->SetFrame(true, 'blue', 1);
|
||||
$graph->SetColor('lightblue');
|
||||
$graph->SetMarginColor('lightblue');
|
||||
|
||||
// Setup X-axis labels
|
||||
$a = $gDateLocale->GetShortMonth();
|
||||
$graph->xaxis->SetTickLabels($a);
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->xaxis->SetColor('darkblue', 'black');
|
||||
|
||||
// Setup "hidden" y-axis by given it the same color
|
||||
// as the background (this could also be done by setting the weight
|
||||
// to zero)
|
||||
$graph->yaxis->SetColor('lightblue', 'darkblue');
|
||||
$graph->ygrid->SetColor('white');
|
||||
|
||||
// Setup graph title ands fonts
|
||||
$graph->title->Set('Using grace = 50%');
|
||||
$graph->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
$graph->xaxis->SetTitle('Year 2002', 'center');
|
||||
$graph->xaxis->SetTitleMargin(10);
|
||||
$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
|
||||
// Add some grace to the top so that the scale doesn't
|
||||
// end exactly at the max value.
|
||||
$graph->yaxis->scale->SetGrace(50);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor('darkblue');
|
||||
$bplot->SetColor('darkblue');
|
||||
$bplot->SetWidth(0.5);
|
||||
$bplot->SetShadow('darkgray');
|
||||
|
||||
// Setup the values that are displayed on top of each bar
|
||||
// Must use TTF fonts if we want text at an arbitrary angle
|
||||
$bplot->value->Show();
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8);
|
||||
$bplot->value->SetFormat('$%d');
|
||||
$bplot->value->SetColor('darkred');
|
||||
$bplot->value->SetAngle(45);
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally stroke the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$datay = array(7, 19, 11, 4, 20);
|
||||
|
||||
// Create the graph and setup the basic parameters
|
||||
$graph = new Graph\Graph(300, 200, 'auto');
|
||||
$graph->img->SetMargin(40, 30, 40, 50);
|
||||
$graph->SetScale("textint");
|
||||
$graph->SetFrame(true, 'blue', 1);
|
||||
$graph->SetColor('lightblue');
|
||||
$graph->SetMarginColor('lightblue');
|
||||
|
||||
// Setup X-axis labels
|
||||
$a = $gDateLocale->GetShortMonth();
|
||||
$graph->xaxis->SetTickLabels($a);
|
||||
$graph->xaxis->SetFont(FF_FONT1);
|
||||
$graph->xaxis->SetColor('darkblue', 'black');
|
||||
|
||||
// Setup "hidden" y-axis by given it the same color
|
||||
// as the background (this could also be done by setting the weight
|
||||
// to zero)
|
||||
$graph->yaxis->SetColor('lightblue', 'darkblue');
|
||||
$graph->ygrid->SetColor('white');
|
||||
|
||||
// Setup graph title ands fonts
|
||||
$graph->title->Set('Using grace = 100%');
|
||||
$graph->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
$graph->xaxis->SetTitle('Year 2002', 'center');
|
||||
$graph->xaxis->SetTitleMargin(10);
|
||||
$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD);
|
||||
|
||||
// Add some grace to the top so that the scale doesn't
|
||||
// end exactly at the max value.
|
||||
$graph->yaxis->scale->SetGrace(100);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor('darkblue');
|
||||
$bplot->SetColor('darkblue');
|
||||
$bplot->SetWidth(0.5);
|
||||
$bplot->SetShadow('darkgray');
|
||||
|
||||
// Setup the values that are displayed on top of each bar
|
||||
// Must use TTF fonts if we want text at an arbitrary angle
|
||||
$bplot->value->Show();
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8);
|
||||
$bplot->value->SetFormat('$%d');
|
||||
$bplot->value->SetColor('darkred');
|
||||
$bplot->value->SetAngle(45);
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Finally stroke the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// $Id: groupbarex1.php,v 1.2 2002/07/11 23:27:28 aditus Exp $
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay1 = array(35, 160, 0, 0, 0, 0);
|
||||
$datay2 = array(35, 190, 190, 190, 190, 190);
|
||||
$datay3 = array(20, 70, 70, 140, 230, 260);
|
||||
|
||||
$graph = new Graph\Graph(450, 200, 'auto');
|
||||
$graph->SetScale("textlin");
|
||||
$graph->SetShadow();
|
||||
$graph->img->SetMargin(40, 30, 40, 40);
|
||||
$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());
|
||||
|
||||
$graph->xaxis->title->Set('Year 2002');
|
||||
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
$graph->title->Set('Group bar plot');
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
$bplot1 = new Plot\BarPlot($datay1);
|
||||
$bplot2 = new Plot\BarPlot($datay2);
|
||||
$bplot3 = new Plot\BarPlot($datay3);
|
||||
|
||||
$bplot1->SetFillColor("orange");
|
||||
$bplot2->SetFillColor("brown");
|
||||
$bplot3->SetFillColor("darkgreen");
|
||||
|
||||
$bplot1->SetShadow();
|
||||
$bplot2->SetShadow();
|
||||
$bplot3->SetShadow();
|
||||
|
||||
$bplot1->SetShadow();
|
||||
$bplot2->SetShadow();
|
||||
$bplot3->SetShadow();
|
||||
|
||||
$gbarplot = new Plot\GroupBarPlot(array($bplot1, $bplot2, $bplot3));
|
||||
$gbarplot->SetWidth(0.6);
|
||||
$graph->Add($gbarplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,63 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay = array(2, 3, 5, 8, 12, 6, 3);
|
||||
$datax = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul');
|
||||
|
||||
// Size of graph
|
||||
$width = 400;
|
||||
$height = 500;
|
||||
|
||||
// Set the basic parameters of the graph
|
||||
$graph = new Graph\Graph($width, $height, 'auto');
|
||||
$graph->SetScale('textlin');
|
||||
|
||||
// Rotate graph 90 degrees and set margin
|
||||
$graph->Set90AndMargin(50, 20, 50, 30);
|
||||
|
||||
// Nice shadow
|
||||
$graph->SetShadow();
|
||||
|
||||
// Setup title
|
||||
$graph->title->Set('Horizontal bar graph ex 1');
|
||||
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14);
|
||||
|
||||
// Setup X-axis
|
||||
$graph->xaxis->SetTickLabels($datax);
|
||||
$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 12);
|
||||
|
||||
// Some extra margin looks nicer
|
||||
$graph->xaxis->SetLabelMargin(10);
|
||||
|
||||
// Label align for X-axis
|
||||
$graph->xaxis->SetLabelAlign('right', 'center');
|
||||
|
||||
// Add some grace to y-axis so the bars doesn't go
|
||||
// all the way to the end of the plot area
|
||||
$graph->yaxis->scale->SetGrace(20);
|
||||
|
||||
// We don't want to display Y-axis
|
||||
$graph->yaxis->Hide();
|
||||
|
||||
// Now create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor('orange');
|
||||
$bplot->SetShadow();
|
||||
|
||||
//You can change the width of the bars if you like
|
||||
//$bplot->SetWidth(0.5);
|
||||
|
||||
// We want to display the value of each bar at the top
|
||||
$bplot->value->Show();
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
$bplot->value->SetAlign('left', 'center');
|
||||
$bplot->value->SetColor('black', 'darkred');
|
||||
$bplot->value->SetFormat('%.1f mkr');
|
||||
|
||||
// Add the bar to the graph
|
||||
$graph->Add($bplot);
|
||||
|
||||
// .. and stroke the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,69 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay = array(2, 3, 5, 8, 12, 6, 3);
|
||||
$datax = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul");
|
||||
|
||||
$width = 400;
|
||||
$height = 500;
|
||||
|
||||
// Set the basic parameters of the graph
|
||||
$graph = new Graph\Graph($width, $height, 'auto');
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
$top = 80;
|
||||
$bottom = 30;
|
||||
$left = 50;
|
||||
$right = 30;
|
||||
$graph->Set90AndMargin($left, $right, $top, $bottom);
|
||||
|
||||
// Nice shadow
|
||||
$graph->SetShadow();
|
||||
|
||||
// Setup title
|
||||
$graph->title->Set("Horizontal bar graph ex 2");
|
||||
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14);
|
||||
$graph->subtitle->Set("(Axis at top)");
|
||||
|
||||
// Setup X-axis
|
||||
$graph->xaxis->SetTickLabels($datax);
|
||||
$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 12);
|
||||
|
||||
// Some extra margin looks nicer
|
||||
$graph->xaxis->SetLabelMargin(5);
|
||||
|
||||
// Label align for X-axis
|
||||
$graph->xaxis->SetLabelAlign('right', 'center');
|
||||
|
||||
// Add some grace to y-axis so the bars doesn't go
|
||||
// all the way to the end of the plot area
|
||||
$graph->yaxis->scale->SetGrace(20);
|
||||
$graph->yaxis->SetLabelAlign('center', 'bottom');
|
||||
$graph->yaxis->SetLabelAngle(45);
|
||||
$graph->yaxis->SetLabelFormat('%d');
|
||||
$graph->yaxis->SetFont(FF_VERDANA, FS_NORMAL, 12);
|
||||
|
||||
// We don't want to display Y-axis
|
||||
//$graph->yaxis->Hide();
|
||||
|
||||
// Now create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor("orange");
|
||||
$bplot->SetShadow();
|
||||
|
||||
//You can change the width of the bars if you like
|
||||
//$bplot->SetWidth(0.5);
|
||||
|
||||
// We want to display the value of each bar at the top
|
||||
$bplot->value->Show();
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
$bplot->value->SetAlign('left', 'center');
|
||||
$bplot->value->SetColor("black", "darkred");
|
||||
$bplot->value->SetFormat('%.1f mkr');
|
||||
|
||||
// Add the bar to the graph
|
||||
$graph->Add($bplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,98 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay = array(2, 3, -5, 8, 12, 6, 3);
|
||||
$datax = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul");
|
||||
|
||||
// Size of graph
|
||||
$width = 400;
|
||||
$height = 500;
|
||||
|
||||
// Set the basic parameters of the graph
|
||||
$graph = new Graph\Graph($width, $height, 'auto');
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
$top = 50;
|
||||
$bottom = 80;
|
||||
$left = 50;
|
||||
$right = 20;
|
||||
$graph->Set90AndMargin($left, $right, $top, $bottom);
|
||||
|
||||
$graph->xaxis->SetPos('min');
|
||||
|
||||
// Nice shadow
|
||||
$graph->SetShadow();
|
||||
|
||||
// Setup title
|
||||
$graph->title->Set("Horizontal bar graph ex 3");
|
||||
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 14);
|
||||
$graph->subtitle->Set("(Axis at bottom)");
|
||||
|
||||
// Setup X-axis
|
||||
$graph->xaxis->SetTickLabels($datax);
|
||||
$graph->xaxis->SetFont(FF_FONT2, FS_BOLD, 12);
|
||||
|
||||
// Some extra margin looks nicer
|
||||
$graph->xaxis->SetLabelMargin(5);
|
||||
|
||||
// Label align for X-axis
|
||||
$graph->xaxis->SetLabelAlign('right', 'center');
|
||||
|
||||
// Add some grace to y-axis so the bars doesn't go
|
||||
// all the way to the end of the plot area
|
||||
$graph->yaxis->scale->SetGrace(20);
|
||||
|
||||
// Setup the Y-axis to be displayed in the bottom of the
|
||||
// graph. We also finetune the exact layout of the title,
|
||||
// ticks and labels to make them look nice.
|
||||
$graph->yaxis->SetPos('max');
|
||||
|
||||
// First make the labels look right
|
||||
$graph->yaxis->SetLabelAlign('center', 'top');
|
||||
$graph->yaxis->SetLabelFormat('%d');
|
||||
$graph->yaxis->SetLabelSide(SIDE_RIGHT);
|
||||
|
||||
// The fix the tick marks
|
||||
$graph->yaxis->SetTickSide(SIDE_LEFT);
|
||||
|
||||
// Finally setup the title
|
||||
$graph->yaxis->SetTitleSide(SIDE_RIGHT);
|
||||
$graph->yaxis->SetTitleMargin(35);
|
||||
|
||||
// To align the title to the right use :
|
||||
$graph->yaxis->SetTitle('Turnaround 2002', 'high');
|
||||
$graph->yaxis->title->Align('right');
|
||||
|
||||
// To center the title use :
|
||||
//$graph->yaxis->SetTitle('Turnaround 2002','center');
|
||||
//$graph->yaxis->title->Align('center');
|
||||
|
||||
$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
$graph->yaxis->title->SetAngle(0);
|
||||
|
||||
$graph->yaxis->SetFont(FF_FONT2, FS_NORMAL);
|
||||
// If you want the labels at an angle other than 0 or 90
|
||||
// you need to use TTF fonts
|
||||
//$graph->yaxis->SetLabelAngle(0);
|
||||
|
||||
// Now create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor("orange");
|
||||
$bplot->SetShadow();
|
||||
|
||||
//You can change the width of the bars if you like
|
||||
//$bplot->SetWidth(0.5);
|
||||
|
||||
// We want to display the value of each bar at the top
|
||||
$bplot->value->Show();
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_BOLD, 12);
|
||||
$bplot->value->SetAlign('left', 'center');
|
||||
$bplot->value->SetColor("black", "darkred");
|
||||
$bplot->value->SetFormat('%.1f mkr');
|
||||
|
||||
// Add the bar to the graph
|
||||
$graph->Add($bplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,48 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// $Id: horizbarex4.php,v 1.4 2002/11/17 23:59:27 aditus Exp $
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay = array(1992, 1993, 1995, 1996, 1997, 1998, 2001);
|
||||
|
||||
// Size of graph
|
||||
$width = 400;
|
||||
$height = 500;
|
||||
|
||||
// Set the basic parameters of the graph
|
||||
$graph = new Graph\Graph($width, $height);
|
||||
$graph->SetScale('textlin');
|
||||
|
||||
$top = 60;
|
||||
$bottom = 30;
|
||||
$left = 80;
|
||||
$right = 30;
|
||||
$graph->Set90AndMargin($left, $right, $top, $bottom);
|
||||
|
||||
// Nice shadow
|
||||
$graph->SetShadow();
|
||||
|
||||
// Setup labels
|
||||
$lbl = array("Andrew\nTait", "Thomas\nAnderssen", "Kevin\nSpacey", "Nick\nDavidsson",
|
||||
"David\nLindquist", "Jason\nTait", "Lorin\nPersson");
|
||||
$graph->xaxis->SetTickLabels($lbl);
|
||||
|
||||
// Label align for X-axis
|
||||
$graph->xaxis->SetLabelAlign('right', 'center', 'right');
|
||||
|
||||
// Label align for Y-axis
|
||||
$graph->yaxis->SetLabelAlign('center', 'bottom');
|
||||
|
||||
// Titles
|
||||
$graph->title->Set('Number of incidents');
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor('orange');
|
||||
$bplot->SetWidth(0.5);
|
||||
$bplot->SetYMin(1990);
|
||||
|
||||
$graph->Add($bplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,83 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay = array(2, 3, 5, 8, 12, 6, 3);
|
||||
$datax = array("320x240", "640x480", "600x800", "1024x768", "1280x1024(16)", "1280x1024(32)",
|
||||
"1600x1200(32)");
|
||||
|
||||
// Size of graph
|
||||
$width = 300;
|
||||
$height = 400;
|
||||
|
||||
// Set the basic parameters of the graph
|
||||
$graph = new Graph\Graph($width, $height, 'auto');
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// No frame around the image
|
||||
$graph->SetFrame(false);
|
||||
|
||||
// Rotate graph 90 degrees and set margin
|
||||
$graph->Set90AndMargin(100, 20, 50, 30);
|
||||
|
||||
// Set white margin color
|
||||
$graph->SetMarginColor('white');
|
||||
|
||||
// Use a box around the plot area
|
||||
$graph->SetBox();
|
||||
|
||||
// Use a gradient to fill the plot area
|
||||
$graph->SetBackgroundGradient('white', 'lightblue', GRAD_HOR, BGRAD_PLOT);
|
||||
|
||||
// Setup title
|
||||
$graph->title->Set("Graphic card performance");
|
||||
$graph->title->SetFont(FF_VERDANA, FS_BOLD, 11);
|
||||
$graph->subtitle->Set("(Non optimized)");
|
||||
|
||||
// Setup X-axis
|
||||
$graph->xaxis->SetTickLabels($datax);
|
||||
$graph->xaxis->SetFont(FF_VERDANA, FS_NORMAL, 8);
|
||||
|
||||
// Some extra margin looks nicer
|
||||
$graph->xaxis->SetLabelMargin(10);
|
||||
|
||||
// Label align for X-axis
|
||||
$graph->xaxis->SetLabelAlign('right', 'center');
|
||||
|
||||
// Add some grace to y-axis so the bars doesn't go
|
||||
// all the way to the end of the plot area
|
||||
$graph->yaxis->scale->SetGrace(20);
|
||||
|
||||
// We don't want to display Y-axis
|
||||
$graph->yaxis->Hide();
|
||||
|
||||
// Now create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetShadow();
|
||||
|
||||
//You can change the width of the bars if you like
|
||||
//$bplot->SetWidth(0.5);
|
||||
|
||||
// Set gradient fill for bars
|
||||
$bplot->SetFillGradient('darkred', 'yellow', GRAD_HOR);
|
||||
|
||||
// We want to display the value of each bar at the top
|
||||
$bplot->value->Show();
|
||||
$bplot->value->SetFont(FF_ARIAL, FS_BOLD, 10);
|
||||
//$bplot->value->SetAlign('left','center');
|
||||
$bplot->value->SetColor("white");
|
||||
$bplot->value->SetFormat('%.1f');
|
||||
$bplot->SetValuePos('max');
|
||||
|
||||
// Add the bar to the graph
|
||||
$graph->Add($bplot);
|
||||
|
||||
// Add some explanation text
|
||||
$txt = new Text('Note: Higher value is better.');
|
||||
$txt->SetPos(190, 399, 'center', 'bottom');
|
||||
$txt->SetFont(FF_ARIAL, FS_NORMAL, 8);
|
||||
$graph->Add($txt);
|
||||
|
||||
// .. and stroke the graph
|
||||
$graph->Stroke();
|
||||
@@ -1,48 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
// $Id: logbarex1.php,v 1.4 2003/05/30 20:12:43 aditus Exp $
|
||||
require_once '../../vendor/autoload.php';
|
||||
require_once 'jpgraph/jpgraph_log.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
$datay = array(4, 13, 30, 28, 12, 45, 30, 12, 55, 3, 0.5);
|
||||
$datax = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov");
|
||||
|
||||
// Create the graph.
|
||||
$graph = new Graph\Graph(400, 220, 'auto');
|
||||
//$graph->img->SetMargin(50,30,50,50);
|
||||
$graph->SetScale("textlog");
|
||||
//$graph->SetShadow();
|
||||
|
||||
// Setup titles for graph and axis
|
||||
$graph->title->Set("Bar with logarithmic Y-scale");
|
||||
$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 18);
|
||||
|
||||
$graph->xaxis->SetTitle("2002");
|
||||
$graph->xaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 16);
|
||||
|
||||
$graph->yaxis->title->SetFont(FF_ARIAL, FS_NORMAL, 16);
|
||||
$graph->yaxis->SetTitle("Y-title", 'center');
|
||||
$graph->yaxis->SetTitleMargin(30);
|
||||
|
||||
// Setup month on X-scale
|
||||
//$graph->xaxis->SetTickLabels($datax);
|
||||
|
||||
// Create a bar pot
|
||||
$bplot = new Plot\BarPlot($datay);
|
||||
$bplot->SetFillColor("orange");
|
||||
|
||||
//You can also set a manual base of the bars
|
||||
//$bplot->SetYBase(0.001);
|
||||
|
||||
/*
|
||||
$bplot->SetShadow();
|
||||
$bplot->value->Show();
|
||||
$bplot->value->SetFont(FF_ARIAL,FS_BOLD);
|
||||
$bplot->value->SetAngle(45);
|
||||
$bplot->value->SetColor("black","darkred");
|
||||
*/
|
||||
|
||||
$graph->Add($bplot);
|
||||
|
||||
$graph->Stroke();
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php // content="text/plain; charset=utf-8"
|
||||
require_once '../../vendor/autoload.php';
|
||||
use Amenadiel\JpGraph\Graph;
|
||||
use Amenadiel\JpGraph\Plot;
|
||||
|
||||
// Some data
|
||||
$databary = array(12, 7, 16, 6, 7, 14, 9, 3);
|
||||
$months = $gDateLocale->GetShortMonth();
|
||||
|
||||
// new Graph\Graph with a drop shadow
|
||||
$graph = new Graph\Graph(300, 200, 'auto');
|
||||
$graph->SetShadow();
|
||||
|
||||
// Use a "text" X-scale
|
||||
$graph->SetScale("textlin");
|
||||
|
||||
// Specify X-labels
|
||||
$graph->xaxis->SetTickLabels($months);
|
||||
|
||||
// Set title and subtitle
|
||||
$graph->title->Set("Textscale with specified labels");
|
||||
|
||||
// Use built in font
|
||||
$graph->title->SetFont(FF_FONT1, FS_BOLD);
|
||||
|
||||
// Create the bar plot
|
||||
$b1 = new Plot\BarPlot($databary);
|
||||
$b1->SetLegend("Temperature");
|
||||
|
||||
//$b1->SetAbsWidth(6);
|
||||
//$b1->SetShadow();
|
||||
|
||||
// The order the plots are added determines who's ontop
|
||||
$graph->Add($b1);
|
||||
|
||||
// Finally output the image
|
||||
$graph->Stroke();
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user