Suppression du répertoire graphs
This commit is contained in:
parent
0b76bc47b9
commit
f1282c5251
@ -1,74 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
$client = new SoapClient(null, array( 'trace' => 1,
|
|
||||||
'soap_version' => SOAP_1_1,
|
|
||||||
'location' => WEBSERVICE_URL,
|
|
||||||
'uri' => WEBSERVICE_URI,
|
|
||||||
'login' => 'ylenaour',
|
|
||||||
'password' => 'bzh4231*',
|
|
||||||
// 'encoding' => 'UTF-8'
|
|
||||||
));
|
|
||||||
|
|
||||||
$O = $client->getStatsUtilisateurs($_REQUEST['login'], $_REQUEST['mois'], $_REQUEST['vue'], $_REQUEST['payant']);
|
|
||||||
$tabData=$O['results'];
|
|
||||||
|
|
||||||
if (isset($_REQUEST['w']) && $_REQUEST['w']<>'') $w=$_REQUEST['w'];
|
|
||||||
else die();
|
|
||||||
|
|
||||||
if (isset($_REQUEST['h']) && $_REQUEST['h']<>'') $h=$_REQUEST['h'];
|
|
||||||
else die();
|
|
||||||
|
|
||||||
/*if (isset($_REQUEST['d']) && $_REQUEST['d']<>'') $tabData=unserialize(urldecode($_REQUEST['d']));
|
|
||||||
else die();
|
|
||||||
*/
|
|
||||||
require_once("./lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the bar chart
|
|
||||||
$labels=$data=array();
|
|
||||||
//print_r($tabData);die();
|
|
||||||
foreach ($tabData as $i=>$jour) {
|
|
||||||
if ($_REQUEST['vue']=='heure') $labels[]=$jour['heures'];
|
|
||||||
else $labels[]=substr($jour['jours'],-2);
|
|
||||||
$data[]=$jour['nb'];
|
|
||||||
}
|
|
||||||
//$data = array(85, 156, 179.5, 211, 123);
|
|
||||||
|
|
||||||
# The labels for the bar chart
|
|
||||||
//$labels = array("Mon", "Tue", "Wed", "Thu", "Fri");
|
|
||||||
|
|
||||||
# Create a XYChart object of size 400 x 240 pixels.
|
|
||||||
$c = new XYChart($w, $h);
|
|
||||||
|
|
||||||
# Add a title to the chart using 14 pts Times Bold Italic font
|
|
||||||
if ($_REQUEST['vue']=='heure') $c->addTitle('Accès par tranches horaires', "timesbi.ttf", 14);
|
|
||||||
elseif (!$_REQUEST['payant']) $c->addTitle('Accès quotidiens sur le mois', "timesbi.ttf", 14);
|
|
||||||
elseif ($_REQUEST['payant']) $c->addTitle('dont actes payants', "timesbi.ttf", 14);
|
|
||||||
|
|
||||||
# Set the plotarea at (45, 40) and of 300 x 160 pixels in size. Use alternating light
|
|
||||||
# grey (f8f8f8) / white (ffffff) background.
|
|
||||||
$c->setPlotArea(45, 40, $w*0.9, $h*0.7, 0xf8f8f8, 0xffffff);
|
|
||||||
|
|
||||||
# Add a multi-color bar chart layer
|
|
||||||
$layer = $c->addBarLayer3($data);
|
|
||||||
|
|
||||||
# Set layer to 3D with 10 pixels 3D depth
|
|
||||||
$layer->set3D(10);
|
|
||||||
|
|
||||||
# Set bar shape to circular (cylinder)
|
|
||||||
if ($_REQUEST['vue']=='heure') $layer->setBarShape(SquareShape,0,0);
|
|
||||||
else $layer->setBarShape(CircleShape);
|
|
||||||
|
|
||||||
# Set the labels on the x axis.
|
|
||||||
$c->xAxis->setLabels($labels);
|
|
||||||
|
|
||||||
# Add a title to the y axis
|
|
||||||
$c->yAxis->setTitle('Nombre de requêtes');
|
|
||||||
|
|
||||||
# Add a title to the x axis
|
|
||||||
if ($_REQUEST['vue']=='heure') $c->xAxis->setTitle('Heures');
|
|
||||||
else $c->xAxis->setTitle('Jour du mois');
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,56 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once './lib/phpchartdir.php';
|
|
||||||
|
|
||||||
# The data for the pie chart
|
|
||||||
//$data = unserialize(urldecode($_REQUEST['d']));
|
|
||||||
$data = unserialize(file_get_contents(realpath(dirname(__FILE__)).'/../../cache/'.$_REQUEST['d']));
|
|
||||||
$firephp->log($data, 'data');
|
|
||||||
|
|
||||||
$w = 570;
|
|
||||||
$h = 210;
|
|
||||||
|
|
||||||
$x = round($w/2);
|
|
||||||
$y = round($h/2);
|
|
||||||
$radius=90;
|
|
||||||
|
|
||||||
$c = new PieChart($w, $h);
|
|
||||||
|
|
||||||
# The labels for the pie chart
|
|
||||||
$labels = array('Immo. incorporelles',
|
|
||||||
'Immo. corporelles',
|
|
||||||
'Immo. financières',
|
|
||||||
'Stock et encours',
|
|
||||||
'Créances Clients',
|
|
||||||
'Autres créances',
|
|
||||||
'Trésorerie Active');
|
|
||||||
$textBoxObj = $c->addTitle("Composition de l'actif", "timesbi.ttf", 15);
|
|
||||||
|
|
||||||
# Set the center of the pie at (180, 140) and the radius to 100 pixels
|
|
||||||
$c->setPieSize($x, $y, $radius);
|
|
||||||
|
|
||||||
$c->setLabelLayout(SideLayout);
|
|
||||||
# Set the label box background color the same as the sector color, with glass effect,
|
|
||||||
# and with 5 pixels rounded corners
|
|
||||||
$t = $c->setLabelStyle();
|
|
||||||
$t->setBackground(SameAsMainColor, Transparent, glassEffect());
|
|
||||||
$t->setRoundedCorners(5);
|
|
||||||
|
|
||||||
# Set the border color of the sector the same color as the fill color. Set the line # color of the join line to black (0x0)
|
|
||||||
$c->setLineColor(SameAsMainColor, 0x000000);
|
|
||||||
|
|
||||||
# Set the start angle to 135 degrees may improve layout when there are many small
|
|
||||||
# sectors at the end of the data array (that is, data sorted in descending order). It
|
|
||||||
# is because this makes the small sectors position near the horizontal axis, where
|
|
||||||
# the text label has the least tendency to overlap. For data sorted in ascending
|
|
||||||
# order, a start angle of 45 degrees can be used instead.
|
|
||||||
$c->setStartAngle(135);
|
|
||||||
$c->setLabelFormat("<*block,valign=absmiddle*>{label} <*font=timesbi.ttf,size=0*>({percent|0}%)");
|
|
||||||
# Set the pie data and the pie labels
|
|
||||||
$c->setData($data, $labels);
|
|
||||||
$c->set3D(20);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,58 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once './lib/phpchartdir.php';
|
|
||||||
|
|
||||||
# The data for the pie chart
|
|
||||||
//$data = unserialize(urldecode($_REQUEST['d']));
|
|
||||||
$data = unserialize(file_get_contents(realpath(dirname(__FILE__)).'/../../cache/'.$_REQUEST['d']));
|
|
||||||
$firephp->log($data, 'data');
|
|
||||||
|
|
||||||
$w = 570;
|
|
||||||
$h = 210;
|
|
||||||
|
|
||||||
$x=round($w/2);
|
|
||||||
$y=round($h/2);
|
|
||||||
$radius=90;
|
|
||||||
|
|
||||||
$c = new PieChart($w, $h);
|
|
||||||
|
|
||||||
# The labels for the pie chart
|
|
||||||
$labels = array('Fonds propres',
|
|
||||||
'Provisions Risques',
|
|
||||||
'Compte Courant',
|
|
||||||
'Dettes Financières',
|
|
||||||
'Dettes Fournisseurs',
|
|
||||||
'Dettes fiscales',
|
|
||||||
'Autres Dettes',
|
|
||||||
'Trésorerie Passive');
|
|
||||||
$textBoxObj = $c->addTitle("Composition du passif", "timesbi.ttf", 15);
|
|
||||||
|
|
||||||
# Set the center of the pie at (180, 140) and the radius to 100 pixels
|
|
||||||
$c->setPieSize($x, $y, $radius);
|
|
||||||
|
|
||||||
$c->setLabelLayout(SideLayout);
|
|
||||||
# Set the label box background color the same as the sector color, with glass effect,
|
|
||||||
# and with 5 pixels rounded corners
|
|
||||||
$t = $c->setLabelStyle();
|
|
||||||
$t->setBackground(SameAsMainColor, Transparent, glassEffect());
|
|
||||||
$t->setRoundedCorners(5);
|
|
||||||
|
|
||||||
# Set the border color of the sector the same color as the fill color. Set the line # color of the join line to black (0x0)
|
|
||||||
$c->setLineColor(SameAsMainColor, 0x000000);
|
|
||||||
|
|
||||||
# Set the start angle to 135 degrees may improve layout when there are many small
|
|
||||||
# sectors at the end of the data array (that is, data sorted in descending order). It
|
|
||||||
# is because this makes the small sectors position near the horizontal axis, where
|
|
||||||
# the text label has the least tendency to overlap. For data sorted in ascending
|
|
||||||
# order, a start angle of 45 degrees can be used instead.
|
|
||||||
$c->setStartAngle(135);
|
|
||||||
$c->setLabelFormat("<*block,valign=absmiddle*>{label} <*font=timesbi.ttf,size=0*>({percent|0}%)");
|
|
||||||
# Set the pie data and the pie labels
|
|
||||||
$c->setData($data, $labels);
|
|
||||||
$c->set3D(20);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
||||||
?>
|
|
@ -1,58 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once './lib/phpchartdir.php';
|
|
||||||
|
|
||||||
# The data for the pie chart
|
|
||||||
//$data = unserialize(urldecode($_REQUEST['d']));
|
|
||||||
$data = unserialize(file_get_contents(realpath(dirname(__FILE__)).'/../../cache/'.$_REQUEST['d']));
|
|
||||||
$firephp->log($data, 'data');
|
|
||||||
|
|
||||||
$w = 570;
|
|
||||||
$h = 210;
|
|
||||||
|
|
||||||
$x = round($w/2);
|
|
||||||
$y = round($h/2);
|
|
||||||
$radius=70;
|
|
||||||
|
|
||||||
$c = new PieChart($w, $h);
|
|
||||||
|
|
||||||
# The labels for the pie chart
|
|
||||||
$labels = array('Achats de marchandises.',
|
|
||||||
'Autres achats externes',
|
|
||||||
'Charges de fonctionnement',
|
|
||||||
'Amortissement et provisions',
|
|
||||||
'Perte financière',
|
|
||||||
'Impôts sociétés',
|
|
||||||
'RÉSULTAT NET',
|
|
||||||
);
|
|
||||||
|
|
||||||
$textBoxObj = $c->addTitle("Solde Intermédiaire de Gestion", "timesbi.ttf", 15);
|
|
||||||
|
|
||||||
# Set the center of the pie at (180, 140) and the radius to 100 pixels
|
|
||||||
$c->setPieSize($x, $y, $radius);
|
|
||||||
|
|
||||||
$c->setLabelLayout(SideLayout);
|
|
||||||
# Set the label box background color the same as the sector color, with glass effect,
|
|
||||||
# and with 5 pixels rounded corners
|
|
||||||
$t = $c->setLabelStyle();
|
|
||||||
$t->setBackground(SameAsMainColor, Transparent, glassEffect());
|
|
||||||
$t->setRoundedCorners(5);
|
|
||||||
|
|
||||||
# Set the border color of the sector the same color as the fill color. Set the line # color of the join line to black (0x0)
|
|
||||||
$c->setLineColor(SameAsMainColor, 0x000000);
|
|
||||||
$c->setLabelFormat("<*block,valign=absmiddle*>{label} <*font=arial.ttf,size=0*>({percent|0}%)");
|
|
||||||
# Set the start angle to 135 degrees may improve layout when there are many small
|
|
||||||
# sectors at the end of the data array (that is, data sorted in descending order). It
|
|
||||||
# is because this makes the small sectors position near the horizontal axis, where
|
|
||||||
# the text label has the least tendency to overlap. For data sorted in ascending
|
|
||||||
# order, a start angle of 45 degrees can be used instead.
|
|
||||||
$c->setStartAngle(135);
|
|
||||||
|
|
||||||
# Set the pie data and the pie labels
|
|
||||||
$c->setData($data, $labels);
|
|
||||||
$c->set3D(20);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,71 +0,0 @@
|
|||||||
<h3>Nothing here !</h3>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
|||||||
DEVP-2AGF-AAFD-GAEY-BF6F-829C
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,47 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# query string to determine the starting angle and direction
|
|
||||||
$angle = 0;
|
|
||||||
$clockwise = true;
|
|
||||||
if ($_REQUEST["img"] != "0") {
|
|
||||||
$angle = 90;
|
|
||||||
$clockwise = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
# The data for the pie chart
|
|
||||||
$data = array(25, 18, 15, 12, 8, 30, 35);
|
|
||||||
|
|
||||||
# The labels for the pie chart
|
|
||||||
$labels = array("Labor", "Licenses", "Taxes", "Legal", "Insurance", "Facilities",
|
|
||||||
"Production");
|
|
||||||
|
|
||||||
# Create a PieChart object of size 280 x 240 pixels
|
|
||||||
$c = new PieChart(280, 240);
|
|
||||||
|
|
||||||
# Set the center of the pie at (140, 130) and the radius to 80 pixels
|
|
||||||
$c->setPieSize(140, 130, 80);
|
|
||||||
|
|
||||||
# Add a title to the pie to show the start angle and direction
|
|
||||||
if ($clockwise) {
|
|
||||||
$c->addTitle("Start Angle = $angle degrees\nDirection = Clockwise");
|
|
||||||
} else {
|
|
||||||
$c->addTitle("Start Angle = $angle degrees\nDirection = AntiClockwise");
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set the pie start angle and direction
|
|
||||||
$c->setStartAngle($angle, $clockwise);
|
|
||||||
|
|
||||||
# Draw the pie in 3D
|
|
||||||
$c->set3D();
|
|
||||||
|
|
||||||
# Set the pie data and the pie labels
|
|
||||||
$c->setData($data, $labels);
|
|
||||||
|
|
||||||
# Explode the 1st sector (index = 0)
|
|
||||||
$c->setExplode(0);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
Binary file not shown.
Before Width: | Height: | Size: 210 B |
@ -1,45 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the chart
|
|
||||||
$data = array(5.5, 3.5, -3.7, 1.7, -1.4, 3.3);
|
|
||||||
$labels = array("Jan", "Feb", "Mar", "Apr", "May", "Jun");
|
|
||||||
|
|
||||||
# Create a XYChart object of size 200 x 180 pixels
|
|
||||||
$c = new XYChart(200, 180);
|
|
||||||
|
|
||||||
# Set the plot area at (30, 20) and of size 140 x 130 pixels
|
|
||||||
$c->setPlotArea(30, 20, 140, 130);
|
|
||||||
|
|
||||||
# Configure the axis as according to the input parameter
|
|
||||||
if ($_REQUEST["img"] == "0") {
|
|
||||||
$c->addTitle("No Axis Extension", "arial.ttf", 8);
|
|
||||||
} else if ($_REQUEST["img"] == "1") {
|
|
||||||
$c->addTitle("Top/Bottom Extensions = 0/0", "arial.ttf", 8);
|
|
||||||
# Reserve 20% margin at top of plot area when auto-scaling
|
|
||||||
$c->yAxis->setAutoScale(0, 0);
|
|
||||||
} else if ($_REQUEST["img"] == "2") {
|
|
||||||
$c->addTitle("Top/Bottom Extensions = 0.2/0.2", "arial.ttf", 8);
|
|
||||||
# Reserve 20% margin at top and bottom of plot area when auto-scaling
|
|
||||||
$c->yAxis->setAutoScale(0.2, 0.2);
|
|
||||||
} else if ($_REQUEST["img"] == "3") {
|
|
||||||
$c->addTitle("Axis Top Margin = 15", "arial.ttf", 8);
|
|
||||||
# Reserve 15 pixels at top of plot area
|
|
||||||
$c->yAxis->setMargin(15);
|
|
||||||
} else {
|
|
||||||
$c->addTitle("Manual Scale -5 to 10", "arial.ttf", 8);
|
|
||||||
# Set the y axis to scale from -5 to 10, with ticks every 5 units
|
|
||||||
$c->yAxis->setLinearScale(-5, 10, 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set the labels on the x axis
|
|
||||||
$c->xAxis->setLabels($labels);
|
|
||||||
|
|
||||||
# Add a color bar layer using the given data. Use a 1 pixel 3D border for the bars.
|
|
||||||
$barLayerObj = $c->addBarLayer3($data);
|
|
||||||
$barLayerObj->setBorderColor(-1, 1);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,40 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the chart
|
|
||||||
$data = array(85, 156, 179.5, 211, 123);
|
|
||||||
$labels = array("Mon", "Tue", "Wed", "Thu", "Fri");
|
|
||||||
|
|
||||||
# Create a XYChart object of size 270 x 270 pixels
|
|
||||||
$c = new XYChart(270, 270);
|
|
||||||
|
|
||||||
# Set the plot area at (40, 32) and of size 200 x 200 pixels
|
|
||||||
$plotarea = $c->setPlotArea(40, 32, 200, 200);
|
|
||||||
|
|
||||||
# Set the background style based on the input parameter
|
|
||||||
if ($_REQUEST["img"] == "0") {
|
|
||||||
# Has wallpaper image
|
|
||||||
$c->setWallpaper(dirname(__FILE__)."/tile.gif");
|
|
||||||
} else if ($_REQUEST["img"] == "1") {
|
|
||||||
# Use a background image as the plot area background
|
|
||||||
$plotarea->setBackground2(dirname(__FILE__)."/bg.png");
|
|
||||||
} else if ($_REQUEST["img"] == "2") {
|
|
||||||
# Use white (0xffffff) and grey (0xe0e0e0) as two alternate plotarea background
|
|
||||||
# colors
|
|
||||||
$plotarea->setBackground(0xffffff, 0xe0e0e0);
|
|
||||||
} else {
|
|
||||||
# Use a dark background palette
|
|
||||||
$c->setColors($whiteOnBlackPalette);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set the labels on the x axis
|
|
||||||
$c->xAxis->setLabels($labels);
|
|
||||||
|
|
||||||
# Add a color bar layer using the given data. Use a 1 pixel 3D border for the bars.
|
|
||||||
$barLayerObj = $c->addBarLayer3($data);
|
|
||||||
$barLayerObj->setBorderColor(-1, 1);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
Binary file not shown.
Before Width: | Height: | Size: 9.9 KiB |
@ -1,43 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# Sample data for the Box-Whisker chart. Represents the minimum, 1st quartile,
|
|
||||||
# medium, 3rd quartile and maximum values of some quantities
|
|
||||||
$Q0Data = array(40, 45, 40, 30, 20, 50, 25, 44);
|
|
||||||
$Q1Data = array(55, 60, 50, 40, 38, 60, 51, 60);
|
|
||||||
$Q2Data = array(62, 70, 60, 50, 48, 70, 62, 70);
|
|
||||||
$Q3Data = array(70, 80, 65, 60, 53, 78, 69, 76);
|
|
||||||
$Q4Data = array(80, 90, 75, 70, 60, 85, 80, 84);
|
|
||||||
|
|
||||||
# The labels for the chart
|
|
||||||
$labels = array("Group A", "Group B", "Group C", "Group D", "Group E", "Group F",
|
|
||||||
"Group G", "Group H");
|
|
||||||
|
|
||||||
# Create a XYChart object of size 550 x 250 pixels
|
|
||||||
$c = new XYChart(550, 250);
|
|
||||||
|
|
||||||
# Set the plotarea at (50, 25) and of size 450 x 200 pixels. Enable both horizontal
|
|
||||||
# and vertical grids by setting their colors to grey (0xc0c0c0)
|
|
||||||
$plotAreaObj = $c->setPlotArea(50, 25, 450, 200);
|
|
||||||
$plotAreaObj->setGridColor(0xc0c0c0, 0xc0c0c0);
|
|
||||||
|
|
||||||
# Add a title to the chart
|
|
||||||
$c->addTitle("Computer Vision Test Scores");
|
|
||||||
|
|
||||||
# Set the labels on the x axis and the font to Arial Bold
|
|
||||||
$labelsObj = $c->xAxis->setLabels($labels);
|
|
||||||
$labelsObj->setFontStyle("arialbd.ttf");
|
|
||||||
|
|
||||||
# Set the font for the y axis labels to Arial Bold
|
|
||||||
$c->yAxis->setLabelStyle("arialbd.ttf");
|
|
||||||
|
|
||||||
# Add a Box Whisker layer using light blue 0x9999ff as the fill color and blue (0xcc)
|
|
||||||
# as the line color. Set the line width to 2 pixels
|
|
||||||
$boxWhiskerLayerObj = $c->addBoxWhiskerLayer($Q3Data, $Q1Data, $Q4Data, $Q0Data,
|
|
||||||
$Q2Data, 0x9999ff, 0x0000cc);
|
|
||||||
$boxWhiskerLayerObj->setLineWidth(2);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,53 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# Sample data for the Box-Whisker chart. Represents the minimum, 1st quartile,
|
|
||||||
# medium, 3rd quartile and maximum values of some quantities
|
|
||||||
$Q0Data = array(40, 45, 35);
|
|
||||||
$Q1Data = array(55, 60, 50);
|
|
||||||
$Q2Data = array(62, 70, 60);
|
|
||||||
$Q3Data = array(70, 80, 65);
|
|
||||||
$Q4Data = array(80, 90, 75);
|
|
||||||
|
|
||||||
# The labels for the chart
|
|
||||||
$labels = array("<*img=robot1.png*><*br*>Bipedal Type",
|
|
||||||
"<*img=robot2.png*><*br*>Wolf Type", "<*img=robot5.png*><*br*>Bird Type");
|
|
||||||
|
|
||||||
# Create a XYChart object of size 540 x 320 pixels
|
|
||||||
$c = new XYChart(540, 320);
|
|
||||||
|
|
||||||
# swap the x and y axes to create a horizontal box-whisker chart
|
|
||||||
$c->swapXY();
|
|
||||||
|
|
||||||
#Set directory for loading images to current script directory
|
|
||||||
#Need when running under Microsoft IIS
|
|
||||||
$c->setSearchPath(dirname(__FILE__));
|
|
||||||
|
|
||||||
# Set the plotarea at (75, 25) and of size 440 x 270 pixels. Enable both horizontal
|
|
||||||
# and vertical grids by setting their colors to grey (0xc0c0c0)
|
|
||||||
$plotAreaObj = $c->setPlotArea(75, 25, 440, 270);
|
|
||||||
$plotAreaObj->setGridColor(0xc0c0c0, 0xc0c0c0);
|
|
||||||
|
|
||||||
# Add a title to the chart
|
|
||||||
$c->addTitle(" Robot Shooting Accuracy Scores");
|
|
||||||
|
|
||||||
# Set the labels on the x axis and the font to Arial Bold
|
|
||||||
$labelsObj = $c->xAxis->setLabels($labels);
|
|
||||||
$labelsObj->setFontStyle("arialbd.ttf");
|
|
||||||
|
|
||||||
# Disable x axis ticks by setting the length to 0
|
|
||||||
$c->xAxis->setTickLength(0);
|
|
||||||
|
|
||||||
# Set the font for the y axis labels to Arial Bold
|
|
||||||
$c->yAxis->setLabelStyle("arialbd.ttf");
|
|
||||||
|
|
||||||
# Add a Box Whisker layer using light blue 0x9999ff as the fill color and blue (0xcc)
|
|
||||||
# as the line color. Set the line width to 2 pixels
|
|
||||||
$boxWhiskerLayerObj = $c->addBoxWhiskerLayer2($Q3Data, $Q1Data, $Q4Data, $Q0Data,
|
|
||||||
$Q2Data);
|
|
||||||
$boxWhiskerLayerObj->setLineWidth(2);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,56 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The XYZ points for the bubble chart
|
|
||||||
$dataX0 = array(150, 300, 1000, 1700);
|
|
||||||
$dataY0 = array(12, 60, 25, 65);
|
|
||||||
$dataZ0 = array(20, 50, 50, 85);
|
|
||||||
|
|
||||||
$dataX1 = array(500, 1000, 1300);
|
|
||||||
$dataY1 = array(35, 50, 75);
|
|
||||||
$dataZ1 = array(30, 55, 95);
|
|
||||||
|
|
||||||
# Create a XYChart object of size 450 x 420 pixels
|
|
||||||
$c = new XYChart(450, 420);
|
|
||||||
|
|
||||||
# Set the plotarea at (55, 65) and of size 350 x 300 pixels, with a light grey border
|
|
||||||
# (0xc0c0c0). Turn on both horizontal and vertical grid lines with light grey color
|
|
||||||
# (0xc0c0c0)
|
|
||||||
$c->setPlotArea(55, 65, 350, 300, -1, -1, 0xc0c0c0, 0xc0c0c0, -1);
|
|
||||||
|
|
||||||
# Add a legend box at (50, 30) (top of the chart) with horizontal layout. Use 12 pts
|
|
||||||
# Times Bold Italic font. Set the background and border color to Transparent.
|
|
||||||
$legendObj = $c->addLegend(50, 30, false, "timesbi.ttf", 12);
|
|
||||||
$legendObj->setBackground(Transparent);
|
|
||||||
|
|
||||||
# Add a title to the chart using 18 pts Times Bold Itatic font.
|
|
||||||
$c->addTitle("Product Comparison Chart", "timesbi.ttf", 18);
|
|
||||||
|
|
||||||
# Add a title to the y axis using 12 pts Arial Bold Italic font
|
|
||||||
$c->yAxis->setTitle("Capacity (tons)", "arialbi.ttf", 12);
|
|
||||||
|
|
||||||
# Add a title to the x axis using 12 pts Arial Bold Italic font
|
|
||||||
$c->xAxis->setTitle("Range (miles)", "arialbi.ttf", 12);
|
|
||||||
|
|
||||||
# Set the axes line width to 3 pixels
|
|
||||||
$c->xAxis->setWidth(3);
|
|
||||||
$c->yAxis->setWidth(3);
|
|
||||||
|
|
||||||
# Add (dataX0, dataY0) as a scatter layer with semi-transparent red (0x80ff3333)
|
|
||||||
# circle symbols, where the circle size is modulated by dataZ0. This creates a bubble
|
|
||||||
# effect.
|
|
||||||
$scatterLayerObj = $c->addScatterLayer($dataX0, $dataY0, "Technology AAA",
|
|
||||||
CircleSymbol, 9, 0x80ff3333, 0x80ff3333);
|
|
||||||
$scatterLayerObj->setSymbolScale($dataZ0);
|
|
||||||
|
|
||||||
# Add (dataX1, dataY1) as a scatter layer with semi-transparent green (0x803333ff)
|
|
||||||
# circle symbols, where the circle size is modulated by dataZ1. This creates a bubble
|
|
||||||
# effect.
|
|
||||||
$scatterLayerObj = $c->addScatterLayer($dataX1, $dataY1, "Technology BBB",
|
|
||||||
CircleSymbol, 9, 0x803333ff, 0x803333ff);
|
|
||||||
$scatterLayerObj->setSymbolScale($dataZ1);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,75 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The XY points for the bubble chart. The bubble chart has independent bubble size on
|
|
||||||
# the X and Y direction.
|
|
||||||
$dataX0 = array(1000, 1500, 1700);
|
|
||||||
$dataY0 = array(25, 20, 65);
|
|
||||||
$dataZX0 = array(500, 200, 600);
|
|
||||||
$dataZY0 = array(15, 30, 20);
|
|
||||||
|
|
||||||
$dataX1 = array(500, 1000, 1300);
|
|
||||||
$dataY1 = array(35, 50, 75);
|
|
||||||
$dataZX1 = array(800, 300, 500);
|
|
||||||
$dataZY1 = array(8, 27, 25);
|
|
||||||
|
|
||||||
$dataX2 = array(150, 300);
|
|
||||||
$dataY2 = array(20, 60);
|
|
||||||
$dataZX2 = array(160, 400);
|
|
||||||
$dataZY2 = array(30, 20);
|
|
||||||
|
|
||||||
# Create a XYChart object of size 450 x 420 pixels
|
|
||||||
$c = new XYChart(450, 420);
|
|
||||||
|
|
||||||
# Set the plotarea at (55, 65) and of size 350 x 300 pixels, with a light grey border
|
|
||||||
# (0xc0c0c0). Turn on both horizontal and vertical grid lines with light grey color
|
|
||||||
# (0xc0c0c0)
|
|
||||||
$c->setPlotArea(55, 65, 350, 300, -1, -1, 0xc0c0c0, 0xc0c0c0, -1);
|
|
||||||
|
|
||||||
# Add a legend box at (50, 30) (top of the chart) with horizontal layout. Use 12 pts
|
|
||||||
# Times Bold Italic font. Set the background and border color to Transparent.
|
|
||||||
$legendObj = $c->addLegend(50, 30, false, "timesbi.ttf", 12);
|
|
||||||
$legendObj->setBackground(Transparent);
|
|
||||||
|
|
||||||
# Add a title to the chart using 18 pts Times Bold Itatic font.
|
|
||||||
$c->addTitle("Plasma Battery Comparison", "timesbi.ttf", 18);
|
|
||||||
|
|
||||||
# Add titles to the axes using 12 pts Arial Bold Italic font
|
|
||||||
$c->yAxis->setTitle("Operating Current", "arialbi.ttf", 12);
|
|
||||||
$c->xAxis->setTitle("Operating Voltage", "arialbi.ttf", 12);
|
|
||||||
|
|
||||||
# Set the axes line width to 3 pixels
|
|
||||||
$c->xAxis->setWidth(3);
|
|
||||||
$c->yAxis->setWidth(3);
|
|
||||||
|
|
||||||
# Add (dataX0, dataY0) as a standard scatter layer, and also as a "bubble" scatter
|
|
||||||
# layer, using circles as symbols. The "bubble" scatter layer has symbol size
|
|
||||||
# modulated by (dataZX0, dataZY0) using the scale on the x and y axes.
|
|
||||||
$c->addScatterLayer($dataX0, $dataY0, "Vendor A", CircleSymbol, 9, 0xff3333, 0xff3333
|
|
||||||
);
|
|
||||||
$scatterLayerObj = $c->addScatterLayer($dataX0, $dataY0, "", CircleSymbol, 9,
|
|
||||||
0x80ff3333, 0x80ff3333);
|
|
||||||
$scatterLayerObj->setSymbolScale($dataZX0, XAxisScale, $dataZY0, YAxisScale);
|
|
||||||
|
|
||||||
# Add (dataX1, dataY1) as a standard scatter layer, and also as a "bubble" scatter
|
|
||||||
# layer, using squares as symbols. The "bubble" scatter layer has symbol size
|
|
||||||
# modulated by (dataZX1, dataZY1) using the scale on the x and y axes.
|
|
||||||
$c->addScatterLayer($dataX1, $dataY1, "Vendor B", SquareSymbol, 7, 0x3333ff, 0x3333ff
|
|
||||||
);
|
|
||||||
$scatterLayerObj = $c->addScatterLayer($dataX1, $dataY1, "", SquareSymbol, 9,
|
|
||||||
0x803333ff, 0x803333ff);
|
|
||||||
$scatterLayerObj->setSymbolScale($dataZX1, XAxisScale, $dataZY1, YAxisScale);
|
|
||||||
|
|
||||||
# Add (dataX2, dataY2) as a standard scatter layer, and also as a "bubble" scatter
|
|
||||||
# layer, using diamonds as symbols. The "bubble" scatter layer has symbol size
|
|
||||||
# modulated by (dataZX2, dataZY2) using the scale on the x and y axes.
|
|
||||||
$c->addScatterLayer($dataX2, $dataY2, "Vendor C", DiamondSymbol, 9, 0x00ff00,
|
|
||||||
0x00ff00);
|
|
||||||
$scatterLayerObj = $c->addScatterLayer($dataX2, $dataY2, "", DiamondSymbol, 9,
|
|
||||||
0x8033ff33, 0x8033ff33);
|
|
||||||
$scatterLayerObj->setSymbolScale($dataZX2, XAxisScale, $dataZY2, YAxisScale);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# Some ChartDirector built-in symbols
|
|
||||||
$symbols = array(SquareSymbol, DiamondSymbol, TriangleSymbol, RightTriangleSymbol,
|
|
||||||
LeftTriangleSymbol, InvertedTriangleSymbol, CircleSymbol, StarShape(3),
|
|
||||||
StarShape(4), StarShape(5), StarShape(6), StarShape(7), StarShape(8), StarShape(9
|
|
||||||
), StarShape(10), PolygonShape(5), Polygon2Shape(5), PolygonShape(6),
|
|
||||||
Polygon2Shape(6), PolygonShape(7), PolygonShape(8), CrossShape(0.1), CrossShape(
|
|
||||||
0.2), CrossShape(0.3), CrossShape(0.4), CrossShape(0.5), CrossShape(0.6),
|
|
||||||
CrossShape(0.7), Cross2Shape(0.1), Cross2Shape(0.2), Cross2Shape(0.3),
|
|
||||||
Cross2Shape(0.4), Cross2Shape(0.5), Cross2Shape(0.6), Cross2Shape(0.7));
|
|
||||||
|
|
||||||
# Create a XYChart object of size 450 x 400 pixels
|
|
||||||
$c = new XYChart(450, 400);
|
|
||||||
|
|
||||||
# Set the plotarea at (55, 40) and of size 350 x 300 pixels, with a light grey border
|
|
||||||
# (0xc0c0c0). Turn on both horizontal and vertical grid lines with light grey color
|
|
||||||
# (0xc0c0c0)
|
|
||||||
$c->setPlotArea(55, 40, 350, 300, -1, -1, 0xc0c0c0, 0xc0c0c0, -1);
|
|
||||||
|
|
||||||
# Add a title to the chart using 18 pts Times Bold Itatic font.
|
|
||||||
$c->addTitle("Built-in Symbols", "timesbi.ttf", 18);
|
|
||||||
|
|
||||||
# Set the axes line width to 3 pixels
|
|
||||||
$c->xAxis->setWidth(3);
|
|
||||||
$c->yAxis->setWidth(3);
|
|
||||||
|
|
||||||
# Add each symbol as a separate scatter layer.
|
|
||||||
for($i = 0; $i < count($symbols); ++$i) {
|
|
||||||
$c->addScatterLayer(array($i % 5 + 1), array((int)($i / 5 + 1)), "", $symbols[$i
|
|
||||||
], 15);
|
|
||||||
}
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,67 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
#
|
|
||||||
# Sample data for the CandleStick chart.
|
|
||||||
#
|
|
||||||
$highData = array(2043, 2039, 2076, 2064, 2048, 2058, 2070, 2033, 2027, 2029, 2071,
|
|
||||||
2085, 2034, 2031, 2056, 2128, 2180, 2183, 2192, 2213, 2230, 2281, 2272);
|
|
||||||
|
|
||||||
$lowData = array(1931, 1921, 1985, 2028, 1986, 1994, 1999, 1958, 1943, 1944, 1962,
|
|
||||||
2011, 1975, 1962, 1928, 2059, 2112, 2103, 2151, 2127, 2123, 2152, 2212);
|
|
||||||
|
|
||||||
$openData = array(2000, 1957, 1993, 2037, 2018, 2021, 2045, 2009, 1959, 1985, 2008,
|
|
||||||
2048, 2006, 2010, 1971, 2080, 2116, 2137, 2170, 2172, 2171, 2191, 2240);
|
|
||||||
|
|
||||||
$closeData = array(1950, 1991, 2026, 2029, 2004, 2053, 2011, 1962, 1987, 2019, 2040,
|
|
||||||
2016, 1996, 1985, 2006, 2113, 2142, 2167, 2158, 2201, 2188, 2231, 2242);
|
|
||||||
|
|
||||||
# The labels for the CandleStick chart
|
|
||||||
$labels = array("Mon 1", "Tue 2", "Wed 3", "Thu 4", "Fri 5", "Mon 8", "Tue 9",
|
|
||||||
"Wed 10", "Thu 11", "Fri 12", "Mon 15", "Tue 16", "Wed 17", "Thu 18", "Fri 19",
|
|
||||||
"Mon 22", "Tue 23", "Wed 24", "Thu 25", "Fri 26", "Mon 29", "Tue 30", "Wed 31");
|
|
||||||
|
|
||||||
# Create a XYChart object of size 600 x 350 pixels
|
|
||||||
$c = new XYChart(600, 350);
|
|
||||||
|
|
||||||
# Set the plotarea at (50, 25) and of size 500 x 250 pixels. Enable both the
|
|
||||||
# horizontal and vertical grids by setting their colors to grey (0xc0c0c0)
|
|
||||||
$plotAreaObj = $c->setPlotArea(50, 25, 500, 250);
|
|
||||||
$plotAreaObj->setGridColor(0xc0c0c0, 0xc0c0c0);
|
|
||||||
|
|
||||||
# Add a title to the chart
|
|
||||||
$c->addTitle("Universal Stock Index on Jan 2001");
|
|
||||||
|
|
||||||
# Add a custom text at (50, 25) (the upper left corner of the plotarea). Use 12 pts
|
|
||||||
# Arial Bold/blue (4040c0) as the font.
|
|
||||||
$c->addText(50, 25, "(c) Global XYZ ABC Company", "arialbd.ttf", 12, 0x4040c0);
|
|
||||||
|
|
||||||
# Add a title to the x axis
|
|
||||||
$c->xAxis->setTitle("Jan 2001");
|
|
||||||
|
|
||||||
# Set the labels on the x axis. Rotate the labels by 45 degrees.
|
|
||||||
$labelsObj = $c->xAxis->setLabels($labels);
|
|
||||||
$labelsObj->setFontAngle(45);
|
|
||||||
|
|
||||||
# Add a title to the y axis
|
|
||||||
$c->yAxis->setTitle("Universal Stock Index");
|
|
||||||
|
|
||||||
# Draw the y axis on the right hand side of the plot area
|
|
||||||
$c->setYAxisOnRight(true);
|
|
||||||
|
|
||||||
# Reserve 10% margin at the top and bottom of the plot area during auto-scaling. This
|
|
||||||
# is to leave space for the high and low data labels.
|
|
||||||
$c->yAxis->setAutoScale(0.1, 0.1);
|
|
||||||
|
|
||||||
# Add a CandleStick layer to the chart using green (00ff00) for up candles and red
|
|
||||||
# (ff0000) for down candles
|
|
||||||
$layer = $c->addCandleStickLayer($highData, $lowData, $openData, $closeData,
|
|
||||||
0x00ff00, 0xff0000);
|
|
||||||
|
|
||||||
# Set the line width to 2 pixels
|
|
||||||
$layer->setLineWidth(2);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,21 +0,0 @@
|
|||||||
<html>
|
|
||||||
<body topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">
|
|
||||||
<div style="margin:5;">
|
|
||||||
<div style="font-family:verdana; font-weight:bold; font-size:18pt;">
|
|
||||||
ChartDirector Information
|
|
||||||
</div>
|
|
||||||
<hr color="#000080">
|
|
||||||
<div style="font-family:verdana; font-size:10pt;">
|
|
||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
?>
|
|
||||||
<ul style="margin-top:0; list-style:square; font-family:verdana; font-size:10pt;">
|
|
||||||
<li>Description : <?php echo getDescription() ?><br><br>
|
|
||||||
<li>Version : <?php echo (getVersion() & 0x7f000000) / 0x1000000 ?>.<?php echo (getVersion() & 0xff0000) / 0x10000 ?>.<?php echo getVersion() & 0xffff ?><br><br>
|
|
||||||
<li>Copyright : <?php echo getCopyright() ?><br><br>
|
|
||||||
<li>Boot Log : <br><ul><li><?php echo str_replace("\n", "<li>", getBootLog()) ?></ul><br>
|
|
||||||
<li>Font Loading Test : <br><ul><li><?php echo str_replace("\n", "<li>", libgTTFTest())?></ul>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,223 +0,0 @@
|
|||||||
ase_0=navigator.userAgent.toLowerCase();ase_1=(ase_0.indexOf('gecko')!=-1&&ase_0.indexOf('safari')==-1);ase_2=(ase_0.indexOf('konqueror')!=-1);ase_3=(ase_0.indexOf('safari')!=-1);ase_4=(ase_0.indexOf('opera')!=-1);ase_5=(ase_0.indexOf('msie')!=-1&&!ase_4&&(ase_0.indexOf('webtv')==-1));ase_6=ase_5?-2:0;function ase_7(){return(new RegExp("msie ([0-9]{1,}[\.0-9]{0,})").exec(ase_0)!=null)?parseFloat(RegExp.$1):6.0;}
|
|
||||||
function ase_8(id){return document.getElementById?document.getElementById(id):document.all[id];}
|
|
||||||
function ase_9(e,l9,la,lb,lc){if(window.event)return window.event[l9]+((document.documentElement&&document.documentElement[la])||document.body[la]);else return(typeof e[lb]!='undefined')?e[lb]:e[l9]+window[lc];}
|
|
||||||
function ase_a(e){return ase_9(e,"clientX","scrollLeft","pageX","scrollX")+ase_6;}
|
|
||||||
function ase_b(e){return ase_9(e,"clientY","scrollTop","pageY","scrollY")+ase_6;}
|
|
||||||
function ase_c(e){if(ase_5&&window.event)return window.event.button;else return(e.which==3)?2:e.which;}
|
|
||||||
function ase_d(ld,le){return ld?ld[le]+ase_d(ld.offsetParent,le):0;}
|
|
||||||
function ase_e(ld){return ase_d(ld,"offsetLeft")+(ld.offsetWidth-ld.clientWidth)/2;}
|
|
||||||
function ase_f(ld){return ase_d(ld,"offsetTop")+(ld.offsetHeight-ld.clientHeight)/2;}
|
|
||||||
function ase_g(lf,lg){return lf+((lf.indexOf('?')!=-1)?'&':'?')+lg;}
|
|
||||||
function ase_h(lh,li,lj){var re=new RegExp(li,'g');return lh.replace(re,lj);}
|
|
||||||
function ase_i(ll){var lm=document.scripts;if(((!lm)||(!lm.length))&&document.getElementsByTagName)lm=document.getElementsByTagName("script");if(lm){for(var i=0;i<lm.length;++i){var lo=lm[i].src;if(!lo)continue;var lp=lo.indexOf(ll);if(lp!=-1)return lo.substring(0,lp);}
|
|
||||||
}
|
|
||||||
return "";}
|
|
||||||
function ase_j(lq,lr,ls){var lt=lq.indexOf(lr);var lu=lq.indexOf(ls);if((lt<0)||(lu<=lt))return '';else return lq.substring(lt+lr.length,lu);}
|
|
||||||
function ase_k(lq,lv){var lp=lq.indexOf(lv);return(lp>=0)?lq.substring(0,lp):lq;}
|
|
||||||
function ase_l(lq,lv){var lp=lq.indexOf(lv);return(lp>=0)?lq.substring(lp+1,lq.length):"";}
|
|
||||||
function ase_m(v){return ase_h(ase_h(v,'&','&'),'"','"');}
|
|
||||||
function ase_n(n){n.onload=n.onerror=n.src='';var p=n.parentNode||n.parentElement;if(p&&p.removeChild)p.removeChild(n);else if(n.outerHTML)n.outerHTML='';}
|
|
||||||
function ase_o(f){var f2=frames[f.id];if(f2){var d2=f2.contentDocument||f2.document;if(d2)return d2.body.innerHTML;}
|
|
||||||
return null;}
|
|
||||||
function ase_AJAX_frame_loaded(f){if(f.lx1)return;var l21=ase_o(f);if(null!=l21)f.lh1(l21);ase_n(f);}
|
|
||||||
function ase_AJAX_frame_error(f){if(f.li1)f.li1(700,ase_o(f));ase_n(f);}
|
|
||||||
function ase_p(lf,l31,l41){var f=null;var l51="ase_AJAX_frame_"+(new Date().getTime());if(ase_5&&(ase_7()>=5.5)){document.body.insertAdjacentHTML('AfterBegin',"<IFRAME NAME='"+l51+"' ID='"+l51+"' style='display:none' onload='ase_AJAX_frame_loaded(this)' onerror='ase_AJAX_frame_error(this)'></IFRAME>");f=ase_8(l51);}
|
|
||||||
if(!f){if(l41)l41(600,"Cannot create IFRAME '"+l51+"'");return null;}
|
|
||||||
var f2=frames[f.id];var d2=f2.contentDocument||f2.document;f.lx1=true;d2.open();d2.write('<html><body><form name="ase_form" method="'+((lf.length<1000)?'get':'post')+'" action="'+ase_m(ase_k(lf,"?"))+'">');var l61=ase_l(lf,"?").split("&");for(var i=0;i<l61.length;++i){d2.write('<input type="hidden" name="'+ase_m(ase_k(l61[i],"="))+'" value="'+ase_m(unescape(ase_l(l61[i],"=")))+'">');}
|
|
||||||
d2.write('</form></body></html>');d2.close();f.lx1=false;f.lh1=l31;f.li1=l41;d2.forms['ase_form'].submit();return{'abort':function(){ase_n(f);}};}
|
|
||||||
function ase_q(){if(typeof XMLHttpRequest!='undefined')return new XMLHttpRequest();
|
|
||||||
/*@cc_on
|
|
||||||
@if(@_jscript_version>=5)
|
|
||||||
try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){}
|
|
||||||
try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}
|
|
||||||
@end
|
|
||||||
@*/
|
|
||||||
}
|
|
||||||
function ase_r(lf,l31,l41){var r=ase_q();if(r){r.onreadystatechange=function(){if(r.readyState==4){var status=-9999;eval("try { status = r.status; } catch(e) {}");if(status==-9999)return;if((r.status==200)||(r.status==304))l31(r.responseText);else if(l41)l41(r.status,r.responseText);window.setTimeout(function(){r.onreadystatechange=function(){};r.abort();},1);}
|
|
||||||
}
|
|
||||||
if((lf.length<1000)||(ase_4&&!r.setRequestHeader)){r.open('GET',lf,true);r.send(null);}
|
|
||||||
else {r.open('POST',ase_k(lf,"?"),true);r.setRequestHeader("Content-Type","application/x-www-form-urlencoded");r.send(ase_l(lf,"?"));}
|
|
||||||
return r;}
|
|
||||||
return ase_p(lf,l31,l41);}
|
|
||||||
function _jcv(v){this.lr=v.id;v.lc2=v.useMap;this.lp1=v.style.cursor;this.lr1(v);this.lo={};var l91=v.id+"_JsChartViewerState";this.lu1=ase_8(l91);if(!this.lu1){var p=v.parentNode||v.parentElement;if(p&&p.insertBefore){var s=this.lu1=document.createElement("HIDDEN");s.id=s.name=l91;s.value=this.la1();p.insertBefore(s,v);}
|
|
||||||
else if(v.insertAdjacentHTML){v.insertAdjacentHTML("AfterEnd","<HIDDEN id='"+l91+"' name='"+l91+"'>");this.lu1=ase_8(l91);if(this.lu1)this.lu1.value=this.la1();else this.lu1={"name":l91,"id":l91,"value":this.la1()};}
|
|
||||||
}
|
|
||||||
else this.decodeState(this.lu1.value);this.ls1();if(!ase_5)this.l11(this.lw1());if(this.ln)this.partialUpdate();}
|
|
||||||
_jcvp=_jcv.prototype;_jcv.l22=function(lc1){var ld1=window.cdjcv_path;if(typeof ld1=="undefined")ld1=ase_i("cdjcv.js");else if((ld1.length>0)&&("/=".indexOf(ld1.charAt(ld1.length-1))==-1))ld1+='/';return ld1+lc1;}
|
|
||||||
_jcv.Horizontal=0;_jcv.Vertical=1;_jcv.HorizontalVertical=2;_jcv.Default=0;_jcv.Scroll=2;_jcv.ZoomIn=3;_jcv.ZoomOut=4;_jcv.msgContainer='<div style="font-family:Verdana;font-size:8pt;font-weight:bold;padding:3 8 3 8;border:1pt solid #000000;background-color:#FFCCCC;color:#000000">%msg</div>';_jcv.okButton='<center>[<a href="javascript:%closeScript"> OK </a>]</center>';_jcv.xButton='[<a href="javascript:%closeScript"> X </a>]';_jcv.shortErrorMsg='Error %errCode accessing server'+_jcv.okButton;_jcv.serverErrorMsg=_jcv.xButton+'<div style="font-family:Arial; font-weight:bold; font-size:15pt;">Error %errCode accessing server</div><hr>%errMsg';_jcv.updatingMsg='<div style="padding:0 8 0 6;background-color:#FFFFCC;color:#000000;border:1px solid #000000"><table><tr><td><img src="'+_jcv.l22('wait.gif')+'"></td><td style="font-size:8pt;font-weight:bold;font-family:Verdana">Updating</td></tr></table></div>';_jcv.lj1=new Array("l0","l1","l2","l3","l4","l5","l6","l7","l8","l9","la","lb","lc","ld","le","lf","lg","lh","li","lj","lk","ll","lm","ln","lo","lp","lq");_jcv.get=function(id){var imgObj=ase_8(id);if(!imgObj)return null;if(!imgObj._jcv)imgObj._jcv=new _jcv(imgObj);return imgObj._jcv;}
|
|
||||||
_jcvp.getId=function(){return this.lr;}
|
|
||||||
_jcvp.lt1=function(){return ase_8(this.lr);}
|
|
||||||
_jcvp.lr1=function(){this.lt1().ly=function(e,id){var lf1;if(!this._jcv.lm1)lf1=this._jcv["onImg"+id](e);if(this["_jcvOn"+id+"Chain"])lf1=this["_jcvOn"+id+"Chain"](e);return lf1;};this.lt1()._jcvOnMouseMoveChain=this.lt1().onmousemove;this.lt1()._jcvOnMouseUpChain=this.lt1().onmouseup;this.lt1()._jcvOnMouseDownChain=this.lt1().onmousedown;var lg1=this.lr;this.lt1().onmousemove=function(e){return ase_8(lg1).ly(e,"MouseMove");}
|
|
||||||
this.lt1().onmousedown=function(e){return ase_8(lg1).ly(e,"MouseDown");}
|
|
||||||
this.lt1().onmouseup=function(e){return ase_8(lg1).ly(e,"MouseUp");}
|
|
||||||
}
|
|
||||||
_jcvp.lq2=function(x){return x-ase_e(this.lt1());}
|
|
||||||
_jcvp.lr2=function(y){return y-ase_f(this.lt1());}
|
|
||||||
_jcvp.lp2=function(w){return w;}
|
|
||||||
_jcvp.lo2=function(h){return h;}
|
|
||||||
_jcvp.lm2=function(x){return x+ase_e(this.lt1());}
|
|
||||||
_jcvp.ln2=function(y){return y+ase_f(this.lt1());}
|
|
||||||
_jcvp.ll2=function(w){return w;}
|
|
||||||
_jcvp.lk2=function(h){return h;}
|
|
||||||
_jcvp.setCustomAttr=function(k,v){this.lo[k]=v;this.le2();}
|
|
||||||
_jcvp.getCustomAttr=function(k){return this.lo[k];}
|
|
||||||
_jcvp.l4=0;_jcvp.l5=0;_jcvp.l6=1;_jcvp.l7=1;_jcvp.setViewPortLeft=function(x){this.l4=x;this.le2();}
|
|
||||||
_jcvp.getViewPortLeft=function(){return this.l4;}
|
|
||||||
_jcvp.setViewPortTop=function(y){this.l5=y;this.le2();}
|
|
||||||
_jcvp.getViewPortTop=function(){return this.l5;}
|
|
||||||
_jcvp.setViewPortWidth=function(w){this.l6=w;this.le2();}
|
|
||||||
_jcvp.getViewPortWidth=function(){return this.l6;}
|
|
||||||
_jcvp.setViewPortHeight=function(h){this.l7=h;this.le2();}
|
|
||||||
_jcvp.getViewPortHeight=function(){return this.l7;}
|
|
||||||
_jcvp.l0=-1;_jcvp.l1=-1;_jcvp.l2=-1;_jcvp.l3=-1;_jcvp.l01=function(x,y){x=this.lq2(x);y=this.lr2(y);return(this.l0<=x)&&(x<=this.l0+this.l2)&&(this.l1<=y)&&(y<=this.l1+this.l3);}
|
|
||||||
_jcvp.msgBox=function(lm1,ln1){var m=this.l21;if(!m&&lm1){var d=document;if(d.body.insertAdjacentHTML){var lq1='msg_'+this.lr;d.body.insertAdjacentHTML("BeforeEnd","<DIV ID='"+lq1+"' style='position:absolute;visibility:hidden;'></DIV>");m=ase_8(lq1);}
|
|
||||||
else if(d.createElement){m=d.createElement("DIV");m.style.position='absolute';m.style.visibility='hidden';d.body.appendChild(m);}
|
|
||||||
if(m)this.l21=m;}
|
|
||||||
if(m){window.clearTimeout(m.l31);var s=m.style;if(lm1){if(ln1)m.l31=window.setTimeout(function(){s.visibility='hidden';},Math.abs(ln1));if(ln1<0)lm1+=_jcv.okButton;if(lm1.substring(0,4).toLowerCase()!="<div")lm1=ase_h(_jcv.msgContainer,'%msg',lm1);var lr1="_jcv.get('"+this.lr+"').msgBox();";m.innerHTML=ase_h(lm1,'%closeScript',lr1);s.visibility='visible';s.left=this.lm2(Math.max(0,this.l0+(this.l2-m.offsetWidth)/2));s.top=this.ln2(Math.max(0,this.l1+(this.l3-m.offsetHeight)/2));}
|
|
||||||
else {s.visibility='hidden';}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_jcvp.l8=2;_jcvp.l9="#000000";_jcvp.setSelectionBorderWidth=function(w){this.l8=w;this.le2();}
|
|
||||||
_jcvp.getSelectionBorderWidth=function(){return this.l8;}
|
|
||||||
_jcvp.setSelectionBorderColor=function(c){this.l9=c;this.le2();}
|
|
||||||
_jcvp.getSelectionBorderColor=function(){return this.l9;}
|
|
||||||
_jcvp.lq1=function(){_jcv.l92=this.l62("_jcv_leftLine");_jcv.la2=this.l62("_jcv_rightLine");_jcv.l72=this.l62("_jcv_topLine");_jcv.l82=this.l62("_jcv_bottomLine");}
|
|
||||||
function _jcvp_false_function(){return false;}
|
|
||||||
_jcvp.l62=function(id){var d=document;if(d.body.insertAdjacentHTML){d.body.insertAdjacentHTML("BeforeEnd","<DIV ID='"+id+"' style='position:absolute;visibility:hidden;background-color:#000000;width:1px;height:1px;'><IMG WIDTH='1' HEIGHT='1'></DIV>");var lf1=ase_8(id);if(ase_5&&(ase_7()<5.5))lf1.onmousemove=_jcvp_false_function;return lf1;}
|
|
||||||
else if(d.createElement){var lf1=d.createElement("DIV");var s=lf1.style;s.position="absolute";s.visibility="hidden";s.backgroundColor="#000000";s.width="1px";s.height="1px";d.body.appendChild(lf1);return lf1;}
|
|
||||||
}
|
|
||||||
_jcvp.lk1=function(x,y,lt1,lu1){if(!_jcv.l92)this.lq1();if(!_jcv.l92)return;var lv1=_jcv.l92.style;var lw1=_jcv.la2.style;var lx1=_jcv.l72.style;var ly1=_jcv.l82.style;lv1.left=lx1.left=ly1.left=x;lv1.top=lw1.top=lx1.top=y;lx1.width=ly1.width=lt1;ly1.top=y+lu1-this.l8+1;lv1.height=lw1.height=lu1;lw1.left=x+lt1-this.l8+1;lv1.width=lw1.width=lx1.height=ly1.height=this.l8;lv1.backgroundColor=lw1.backgroundColor=lx1.backgroundColor=ly1.backgroundColor=this.l9;}
|
|
||||||
_jcvp.ll1=function(b){if(b&&!_jcv.l72)this.lq1();if(ase_5&&_jcv.l72&&(ase_7()<5.5)){_jcv.l92.onmouseup=_jcv.la2.onmouseup=_jcv.l72.onmouseup=_jcv.l82.onmouseup=this.lt1().onmouseup;}
|
|
||||||
if(_jcv.l72)_jcv.l92.style.visibility=_jcv.la2.style.visibility=_jcv.l72.style.visibility=_jcv.l82.style.visibility=b?"visible":"hidden";}
|
|
||||||
_jcvp.la=_jcv.Default;_jcvp.lb=_jcv.Horizontal;_jcvp.lc=_jcv.Horizontal;_jcvp.ld=2;_jcvp.le=0.5;_jcvp.lf=0.01;_jcvp.lg=1;_jcvp.lh=0.01;_jcvp.li=1;_jcvp.getMouseUsage=function(){return this.la;}
|
|
||||||
_jcvp.setMouseUsage=function(l02){this.la=l02;this.lf2();this.le2();}
|
|
||||||
_jcvp.lf2=function(){var a=this.lb2;if(a){switch(this.la){case _jcv.ZoomIn:a.href="javascript://ZoomIn";break;case _jcv.ZoomOut:a.href="javascript://ZoomOut";break;default:a.removeAttribute("href");}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_jcvp.getScrollDirection=function(){return this.lb;}
|
|
||||||
_jcvp.setScrollDirection=function(l22){this.lb=l22;this.le2();}
|
|
||||||
_jcvp.getZoomDirection=function(){return this.lc;}
|
|
||||||
_jcvp.setZoomDirection=function(l22){this.lc=l22;this.le2();}
|
|
||||||
_jcvp.getZoomInRatio=function(){return this.ld;}
|
|
||||||
_jcvp.setZoomInRatio=function(l32){if(l32>0)this.ld=l32;this.le2();}
|
|
||||||
_jcvp.getZoomOutRatio=function(){return this.le;}
|
|
||||||
_jcvp.setZoomOutRatio=function(l32){if(l32>0)this.le=l32;this.le2();}
|
|
||||||
_jcvp.getZoomInWidthLimit=function(){return this.lf;}
|
|
||||||
_jcvp.setZoomInWidthLimit=function(l32){this.lf=l32;this.le2();}
|
|
||||||
_jcvp.getZoomOutWidthLimit=function(){return this.lg;}
|
|
||||||
_jcvp.setZoomOutWidthLimit=function(l32){this.lg=l32;this.le2();}
|
|
||||||
_jcvp.getZoomInHeightLimit=function(){return this.lh;}
|
|
||||||
_jcvp.setZoomInHeightLimit=function(l32){this.lh=l32;this.le2();}
|
|
||||||
_jcvp.getZoomOutHeightLimit=function(){return this.li;}
|
|
||||||
_jcvp.setZoomOutHeightLimit=function(l32){this.li=l32;this.le2();}
|
|
||||||
_jcvp.lb1=function(){return((this.lc!=_jcv.Vertical)&&(this.l6>this.lf))||((this.lc!=_jcv.Horizontal)&&(this.l7>this.lh));}
|
|
||||||
_jcvp.lc1=function(){return((this.lc!=_jcv.Vertical)&&(this.l6<this.lg))||((this.lc!=_jcv.Horizontal)&&(this.l7<this.li));}
|
|
||||||
_jcvp.ls2=-1;_jcvp.lt2=-1;_jcvp.lj=5;_jcvp.getMinimumDrag=function(){return this.lj;}
|
|
||||||
_jcvp.setMinimumDrag=function(l42){this.lj=l42;this.le2();}
|
|
||||||
_jcvp.l41=function(e,d){var l52=Math.abs(ase_a(e)-this.ls2);var l62=Math.abs(ase_b(e)-this.lt2);switch(d){case _jcv.Horizontal:return l52>=this.lj;case _jcv.Vertical:return l62>=this.lj;default:return(l52>=this.lj)||(l62>=this.lj);}
|
|
||||||
}
|
|
||||||
_jcvp.onImgMouseDown=function(e){if(this.l01(ase_a(e),ase_b(e))&&(ase_c(e)==1)){if(e&&e.preventDefault&&(this.la!=_jcv.Default))e.preventDefault();this.ld2(true);this.ls(e);}
|
|
||||||
}
|
|
||||||
_jcvp.onImgMouseMove=function(e){if(this.l12&&window.event&&(ase_c(e)!=1)){this.ld2(false);this.l02=false;this.ll1(false);}
|
|
||||||
this.lz1=this.l12||this.l01(ase_a(e),ase_b(e));if(this.lz1){this.lu(e);if(this.l12){if((this.la!=_jcv.Default)&&this.lt1().useMap)this.lt1().useMap=null;this.lt(e);}
|
|
||||||
}
|
|
||||||
this.l11(this.lz(e));return this.la==_jcv.Default;}
|
|
||||||
_jcvp.onImgMouseUp=function(e){if(this.l12&&(ase_c(e)==1)){this.ld2(false);this.lv(e);}
|
|
||||||
}
|
|
||||||
_jcvp.ld2=function(b){var imgObj=this.lt1();if(b){if(((this.la==_jcv.ZoomIn)||(this.la==_jcv.ZoomOut))&&imgObj.useMap)imgObj.useMap=null;}
|
|
||||||
else {if(imgObj.useMap!=imgObj.lc2)imgObj.useMap=imgObj.lc2;}
|
|
||||||
if(!ase_5){if(b){if(!window._jcvOnMouseUpChain)window._jcvOnMouseUpChain=window.onmouseup;if(!window._jcvOnMouseMoveChain)window._jcvOnMouseMoveChain=window.onmousemove;window.onmouseup=imgObj.onmouseup;window.onmousemove=imgObj.onmousemove;}
|
|
||||||
else {window.onmouseup=window._jcvOnMouseUpChain;window.onmousemove=window._jcvOnMouseMoveChain;window._jcvOnMouseUpChain=null;window._jcvOnMouseMoveChain=null;}
|
|
||||||
}
|
|
||||||
this.l12=b;}
|
|
||||||
_jcvp.setZoomInCursor=function(l72){this.lk=l72;this.le2();}
|
|
||||||
_jcvp.getZoomInCursor=function(){return this.lk;}
|
|
||||||
_jcvp.setZoomOutCursor=function(l72){this.ll=l72;this.le2();}
|
|
||||||
_jcvp.getZoomOutCursor=function(){return this.ll;}
|
|
||||||
_jcvp.setNoZoomCursor=function(l72){this.lq=l72;this.le2();}
|
|
||||||
_jcvp.getNoZoomCursor=function(){return this.lq;}
|
|
||||||
_jcvp.setScrollCursor=function(l72){this.lm=l72;this.le2();}
|
|
||||||
_jcvp.getScrollCursor=function(){return this.lm;}
|
|
||||||
_jcvp.lw1=function(){if(ase_5&&(ase_7()<6.0))return "";switch(this.la){case _jcv.ZoomIn:if(this.lb1()){if(this.lk)return this.lk;else return ase_1?"-moz-zoom-in":"url('"+_jcv.l22('zoomin.cur')+"')";}
|
|
||||||
else {if(this.lq)return this.lq;else return ase_1?"default":"url('"+_jcv.l22('nozoom.cur')+"')";}
|
|
||||||
case _jcv.ZoomOut:if(this.lc1()){if(this.ll)return this.ll;else return ase_1?"-moz-zoom-out":"url('"+_jcv.l22('zoomout.cur')+"')";}
|
|
||||||
else {if(this.lq)return this.lq;else return ase_1?"default":"url('"+_jcv.l22('nozoom.cur')+"')";}
|
|
||||||
default:return "";}
|
|
||||||
}
|
|
||||||
_jcvp.lz=function(e){if(this.lm1)return "wait";if(this.l02){if(this.lm)return this.lm;switch(this.lb){case _jcv.Horizontal:return(ase_a(e)>=this.ls2)?"e-resize":"w-resize";case _jcv.Vertical:return(ase_b(e)>=this.lt2)?"s-resize":"n-resize";default:return "move";}
|
|
||||||
}
|
|
||||||
if(this.lz1)return this.lw1();else return "";}
|
|
||||||
_jcvp.l11=function(l82){if(l82!=this.lp1){this.lp1=l82;this.lt1().style.cursor=new String(l82);}
|
|
||||||
}
|
|
||||||
_jcvp.ls=function(e){this.ls2=ase_a(e);this.lt2=ase_b(e);}
|
|
||||||
_jcvp.lu=function(e){}
|
|
||||||
_jcvp.lt=function(e){var eX=ase_a(e);var eY=ase_b(e);if(this.la==_jcv.ZoomIn){var d=this.lc;var lb2=this.lb1()&&this.l41(e,d);if(lb2){var lc2=Math.min(eX,this.ls2);var ld2=Math.min(eY,this.lt2);var l52=Math.abs(eX-this.ls2);var l62=Math.abs(eY-this.lt2);switch(d){case _jcv.Horizontal:this.lk1(lc2,this.ln2(this.l1),l52,this.lk2(this.l3));break;case _jcv.Vertical:this.lk1(this.lm2(this.l0),ld2,this.ll2(this.l2),l62);break;default:this.lk1(lc2,ld2,l52,l62);break;}
|
|
||||||
}
|
|
||||||
this.ll1(lb2);}
|
|
||||||
else if(this.la==_jcv.Scroll){var d=this.lb;if(this.l02||this.l41(e,d)){this.l02=true;var le2=(d==_jcv.Vertical)?0:(eX-this.ls2);var lf2=(d==_jcv.Horizontal)?0:(eY-this.lt2);if((le2<0)&&(this.l4+this.l6-this.l6*this.lp2(le2)/this.l2>1))le2=Math.min(0,(this.l4+this.l6-1)*this.l2/this.l6);if((le2>0)&&(this.l6*this.lp2(le2)/this.l2>this.l4))le2=Math.max(0,this.l4*this.l2/this.l6);if((lf2<0)&&(this.l5+this.l7-this.l7*this.lo2(lf2)/this.l3>1))lf2=Math.min(0,(this.l5+this.l7-1)*this.l3/this.l7);if((lf2>0)&&(this.l7*this.lp2(lf2)/this.l3>this.l5))lf2=Math.max(0,this.l5*this.l3/this.l7);this.lk1(this.lm2(this.l0)+le2,this.ln2(this.l1)+lf2,this.ll2(this.l2),this.lk2(this.l3));this.ll1(true);}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_jcvp.lv=function(e){this.ll1(false);switch(this.la){case _jcv.ZoomIn:if(this.lb1()){if(this.l41(e,this.lc))this.le1(e);else this.lg1(e,this.ld);}
|
|
||||||
break;case _jcv.ZoomOut:if(this.lc1())this.lg1(e,this.le);break;default:if(this.l02)this.lf1(e);break;}
|
|
||||||
this.l02=false;}
|
|
||||||
_jcvp.lg1=function(e,lg2){var eX=ase_a(e);var eY=ase_b(e);var lh2=this.l6/lg2;var li2=this.l7/lg2;this.l71(this.lc,(this.lq2(eX)-this.l0)*this.l6/this.l2-lh2/2,lh2,(this.lr2(eY)-this.l1)*this.l7/this.l3-li2/2,li2);}
|
|
||||||
_jcvp.lf1=function(e){var eX=ase_a(e);var eY=ase_b(e);this.l71(this.lb,this.l6*this.lp2(this.ls2-eX)/this.l2,this.l6,this.l7*this.lo2(this.lt2-eY)/this.l3,this.l7);}
|
|
||||||
_jcvp.le1=function(e){var eX=ase_a(e);var eY=ase_b(e);var lh2=this.l6*this.lp2(Math.abs(this.ls2-eX))/this.l2;var li2=this.l7*this.lo2(Math.abs(this.lt2-eY))/this.l3;this.l71(this.lc,this.l6*(this.lq2(Math.min(this.ls2,eX))-this.l0)/this.l2,lh2,this.l7*(this.lr2(Math.min(this.lt2,eY))-this.l1)/this.l3,li2);}
|
|
||||||
_jcvp.l71=function(d,lj2,lk2,ll2,lm2){var ln2=this.l4;var lo2=this.l5;var lh2=this.l6;var li2=this.l7;if((((lk2<this.l6)&&(this.l6<this.lf))||(d==_jcv.Vertical))&&(((lm2<this.l7)&&(this.l7<this.lh))||(d==_jcv.Horizontal)))return;if(d!=_jcv.Vertical){if(lk2!=this.l6){lh2=Math.max(this.lf,Math.min(lk2,this.lg));lj2-=(lh2-lk2)/2;}
|
|
||||||
ln2=Math.max(0,Math.min(this.l4+lj2,1-lh2));}
|
|
||||||
if(d!=_jcv.Horizontal){if(lm2!=this.l7){li2=Math.max(this.lh,Math.min(lm2,this.li));ll2-=(li2-lm2)/2;}
|
|
||||||
lo2=Math.max(0,Math.min(this.l5+ll2,1-li2));}
|
|
||||||
if((ln2!=this.l4)||(lo2!=this.l5)||(lh2!=this.l6)||(li2!=this.l7)){this.lh2=this.l4;this.li2=this.l5;this.lj2=this.l6;this.lg2=this.l7;this.l4=ln2;this.l5=lo2;this.l6=lh2;this.l7=li2;this.lp=1;this.le2();this.applyHandlers("viewportchanged");this.lp=0;}
|
|
||||||
}
|
|
||||||
_jcvp.lo1=function(lp2){var id=(lp2+"events").toLowerCase();if(!this[id])this[id]=[];return this[id];}
|
|
||||||
_jcvp.attachHandler=function(lp2,f){var a=this.lo1(lp2);a[a.length]=f;return lp2+":"+(a.length-1);}
|
|
||||||
_jcvp.detachHandler=function(lq2){var ab=lq2.split(':');var a=this.lo1(ab[0]);a[parseInt(ab[1])]=null;}
|
|
||||||
_jcvp.applyHandlers=function(lp2){var lf1=false;var a=this.lo1(lp2);for(var i in a){this.lu2=a[i];if(this.lu2!=null)lf1|=this.lu2();}
|
|
||||||
this.lu2=null;return lf1;}
|
|
||||||
_jcvp.partialUpdate=function(){if(this.lm1)return;_jcv.ld1(this.lt1());this.applyHandlers("preupdate");this.ln=1;this.le2();var ls2=this.updatingMsg;if(!ls2)ls2=_jcv.updatingMsg;if(ls2&&(ls2!="none"))this.msgBox(ls2);var lf=ase_g(ase_8(this.lr+"_callBackURL").value,"cdPartialUpdate="+this.lr+"&cdCacheDefeat="+(new Date().getTime())+"&"+this.lu1.name+"="+escape(this.lu1.value));var lt2=this;this.lm1=true;ase_r(lf,function(t){lt2.l42(t)},function(lv2,lw2){lt2.lx(lv2,lw2);});}
|
|
||||||
_jcvp.l42=function(lq){var lx2=ase_j(lq,"<!--CD_SCRIPT "," CD_SCRIPT-->");if(lx2){var ly2=ase_j(lq,"<!--CD_MAP "," CD_MAP-->");var imgObj=this.lt1();var imgBuffer=this.l61=(this.doubleBuffering)?new Image():imgObj;if(imgObj.useMap)imgObj.useMap=null;imgObj.loadImageMap=function(){window.setTimeout(function(){_jcv.putMap(imgObj,ly2);},100);};imgBuffer.onload=function(){imgObj._jcv.onPartialLoad(true);}
|
|
||||||
imgBuffer.onerror=imgBuffer.onabort=function(lm1){imgObj._jcv.lx(999,"Error loading image '"+this.src+"'["+lm1+"]");}
|
|
||||||
var l03=window.onerror;window.onerror=function(lm1){imgObj._jcv.lx(801,"Error interpretating partial update result ["+lm1+"] <div style='margin:20px;background:#dddddd'><xmp>"+lx2+"</xmp></div>")};eval(lx2);window.onerror=l03;if(ase_1)this.le2();}
|
|
||||||
else this.lx(800,"Partial update returns invalid data <div style='margin:20px;background:#dddddd'><xmp>"+lq+"</xmp></div>");}
|
|
||||||
_jcvp.lw=function(l13){var imgObj=this.lt1();var imgBuffer=this.l61;if(imgBuffer)imgBuffer.onerror=imgBuffer.onabort=imgBuffer.onload='';imgObj.onUpdateCompleted='';this.lm1=false;if(l13){if(imgObj!=imgBuffer){imgObj.src=imgBuffer.src;imgObj.style.width=imgBuffer.style.width;imgObj.style.height=imgBuffer.style.height;}
|
|
||||||
imgObj.loadImageMap();}
|
|
||||||
else {imgObj.useMap=imgObj.lc2;if(this.lj2||this.lg2){this.l4=this.lh2;this.l7=this.lg2;this.l5=this.li2;this.l6=this.lj2;this.le2();}
|
|
||||||
}
|
|
||||||
imgObj.loadImageMap='';}
|
|
||||||
_jcvp.onPartialLoad=function(l13){if(this.lt1().onUpdateCompleted)this.lt1().onUpdateCompleted();else this.msgBox();this.lw(l13);this.applyHandlers("postupdate");}
|
|
||||||
_jcvp.lx=function(lv2,lw2){this.lw(false);this.msgBox();this.errCode=lv2;this.errMsg=lw2;if(!this.applyHandlers("updateerror")){var l23=this.serverErrorMsg;if(!l23)l23=_jcv.serverErrorMsg;if(l23&&(l23!="none"))this.msgBox(ase_h(ase_h(l23,'%errCode',lv2),'%errMsg',lw2));}
|
|
||||||
this.errCode=null;this.errMsg=null;}
|
|
||||||
_jcvp.streamUpdate=function(l33){var l43=new Date().getTime();if(!l33)l33=60;var l53=this.l52;if(l53){if(l33*1000>=l43-l53.l51)return false;l53.src=null;l53.onerror=l53.onabort=l53.onload=null;}
|
|
||||||
if(!this.l32)this.l32=this.lt1().src;this.l52=l53=new Image();l53.l51=l43;var lt2=this;l53.onload=function(){var imgObj=lt2.lt1();if(imgObj.useMap)imgObj.useMap=null;var b=lt2.l52;if(imgObj!=b)imgObj.src=b.src;b.onabort();}
|
|
||||||
l53.onerror=l53.onabort=function(){var b=lt2.l52;if(b)b.onload=b.onabort=b.onerror=null;lt2.l52=null;}
|
|
||||||
l53.src=ase_g(this.l32,"cdDirectStream="+this.lr+"&cdCacheDefeat="+l43);return true;}
|
|
||||||
_jcvp.l91=function(a,v){return a+((typeof v!="number")?"**":"*")+v;}
|
|
||||||
_jcvp.l81=function(av){var lp=av.indexOf("*");if(lp==-1)return null;var a=av.substring(0,lp);var v=av.substring(lp+1,av.length);if(v.charAt(0)=="*")v=v.substring(1,v.length);else v=parseFloat(v);return{"attr":a,"value":v};}
|
|
||||||
_jcvp.la1=function(){var lf1="";for(var i=0;i<_jcv.lj1.length;++i){var a=_jcv.lj1[i];var v=null;if((a=="lo")&&this.lo){for(var le in this.lo)v=((v==null)?"":v+"\x1f")+this.l91(le,this.lo[le]);}
|
|
||||||
else v=this[a];if((typeof v!="undefined")&&(null!=v))lf1+=(lf1?"\x1e":"")+this.l91(i,v);}
|
|
||||||
return lf1;}
|
|
||||||
_jcvp.decodeState=function(s){var l61=s.split("\x1e");for(var i=0;i<l61.length;++i){var av=this.l81(l61[i]);if(!av)continue;var a=_jcv.lj1[parseInt(av.attr)];if(a=="lo"){var l73=av.value.split("\x1f");for(var i2=0;i2<l73.length;++i2){var l93=this.l81(l73[i2]);this.lo[l93.attr]=l93.value;}
|
|
||||||
}
|
|
||||||
else this[a]=av.value;}
|
|
||||||
this.lp=0;}
|
|
||||||
_jcvp.le2=function(){if(this.lu1)this.lu1.value=this.la1();}
|
|
||||||
_jcvp.ls1=function(){if(!ase_5){var imgObj=this.lt1();var m=_jcv.ln1(imgObj);if(m){m.onmousedown=imgObj.onmousedown;m.onmousemove=imgObj.onmousemove;if(ase_1&&document.createElement){var a=this.lb2=document.createElement("AREA");a.coords=""+this.l0+","+this.l1+","+(this.l0+this.l2)+","+(this.l1+this.l3);a.shape="rect";a.onclick="return false;";m.appendChild(a);m.ly1=a;this.lf2();}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_jcv.ln1=function(imgObj){var la3=imgObj.lc2;if(!la3)la3=imgObj.useMap;if(!la3)return null;var lp=la3.indexOf('#');if(lp>=0)la3=la3.substring(lp+1);return ase_8(la3);}
|
|
||||||
_jcv.loadMap=function(imgObj,lf){if(!imgObj.lc2)imgObj.lc2=imgObj.useMap;_jcv.ld1(imgObj);imgObj.lv1=ase_r(lf,function(t){_jcv.putMap(imgObj,ase_j(t,"<!--CD_MAP "," CD_MAP-->"));},function(lv2,lw2){_jcv.onLoadMapError(lv2,lw2);}
|
|
||||||
);}
|
|
||||||
_jcv.loadPendingMap=function(){if(!window._jcvPendingMap)return;for(var a in window._jcvPendingMap){var ld=ase_8(a);if(ld){var lf=window._jcvPendingMap[a];window._jcvPendingMap[a]=null;if(lf)_jcv.loadMap(ld,lf);}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_jcv.ld1=function(imgObj){if(imgObj.lv1){imgObj.lv1.abort();imgObj.lv1=null;}
|
|
||||||
}
|
|
||||||
_jcv.onLoadMapError=function(lv2,lw2){}
|
|
||||||
_jcv.putMap=function(imgObj,lb3){var m=_jcv.ln1(imgObj);if(!m&&lb3){var la3='map_'+imgObj.id;imgObj.useMap=imgObj.lc2='#'+la3;var d=document;if(d.body.insertAdjacentHTML){d.body.insertAdjacentHTML("BeforeEnd","<MAP ID='"+la3+"'></MAP>");m=ase_8(la3);}
|
|
||||||
else if(d.createElement){m=d.createElement("MAP");m.id=m.name=la3;d.body.appendChild(m);}
|
|
||||||
if(imgObj._jcv)imgObj._jcv.ls1();}
|
|
||||||
if(m){m.innerHTML=lb3;if(m.ly1)m.appendChild(m.ly1);if(imgObj.useMap!=imgObj.lc2)imgObj.useMap=imgObj.lc2;}
|
|
||||||
imgObj.lv1=null;}
|
|
||||||
_jcv.canSupportPartialUpdate=function(){return((ase_5&&(ase_7()>=5.5))||window.XMLHttpRequest||ase_q());}
|
|
||||||
JsChartViewer=_jcv;_jcv.loadPendingMap();
|
|
@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the pie chart
|
|
||||||
$data = array(25, 18, 15, 12, 30, 35);
|
|
||||||
|
|
||||||
# The labels for the pie chart
|
|
||||||
$labels = array("Labor", "Licenses", "Taxes", "Legal", "Facilities", "Production");
|
|
||||||
|
|
||||||
# Create a PieChart object of size 300 x 300 pixels
|
|
||||||
$c = new PieChart(300, 300);
|
|
||||||
|
|
||||||
if ($_REQUEST["img"] == "0") {
|
|
||||||
#============================================================
|
|
||||||
# Draw a pie chart where the label is on top of the pie
|
|
||||||
#============================================================
|
|
||||||
|
|
||||||
# Set the center of the pie at (150, 150) and the radius to 120 pixels
|
|
||||||
$c->setPieSize(150, 150, 120);
|
|
||||||
|
|
||||||
# Set the label position to -40 pixels from the perimeter of the pie (-ve means
|
|
||||||
# label is inside the pie)
|
|
||||||
$c->setLabelPos(-40);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
#============================================================
|
|
||||||
# Draw a pie chart where the label is outside the pie
|
|
||||||
#============================================================
|
|
||||||
|
|
||||||
# Set the center of the pie at (150, 150) and the radius to 80 pixels
|
|
||||||
$c->setPieSize(150, 150, 80);
|
|
||||||
|
|
||||||
# Set the sector label position to be 20 pixels from the pie. Use a join line to
|
|
||||||
# connect the labels to the sectors.
|
|
||||||
$c->setLabelPos(20, LineColor);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set the label format to three lines, showing the sector name, value, and
|
|
||||||
# percentage. The value 999 will be formatted as US$999K.
|
|
||||||
$c->setLabelFormat("{label}\nUS\${value}K\n({percent}%)");
|
|
||||||
|
|
||||||
# Set the pie data and the pie labels
|
|
||||||
$c->setData($data, $labels);
|
|
||||||
|
|
||||||
# Explode the 1st sector (index = 0)
|
|
||||||
$c->setExplode(0);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,69 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the bar chart
|
|
||||||
$data = array(450, 560, 630, 800, 1100, 1350, 1600, 1950, 2300, 2700);
|
|
||||||
|
|
||||||
# The labels for the bar chart
|
|
||||||
$labels = array("1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003",
|
|
||||||
"2004", "2005");
|
|
||||||
|
|
||||||
# Create a XYChart object of size 600 x 360 pixels
|
|
||||||
$c = new XYChart(600, 360);
|
|
||||||
|
|
||||||
# Add a title to the chart using 18pts Times Bold Italic font
|
|
||||||
$c->addTitle("Annual Revenue for Star Tech", "timesbi.ttf", 18);
|
|
||||||
|
|
||||||
# Set the plotarea at (60, 40) and of size 500 x 280 pixels. Use a vertical gradient
|
|
||||||
# color from light blue (eeeeff) to deep blue (0000cc) as background. Set border and
|
|
||||||
# grid lines to white (ffffff).
|
|
||||||
$c->setPlotArea(60, 40, 500, 280, $c->linearGradientColor(60, 40, 60, 280, 0xeeeeff,
|
|
||||||
0x0000cc), -1, 0xffffff, 0xffffff);
|
|
||||||
|
|
||||||
# Add a multi-color bar chart layer using the supplied data. Use soft lighting effect
|
|
||||||
# with light direction from top.
|
|
||||||
$barLayerObj = $c->addBarLayer3($data);
|
|
||||||
$barLayerObj->setBorderColor(Transparent, softLighting(Top));
|
|
||||||
|
|
||||||
# Set x axis labels using the given labels
|
|
||||||
$c->xAxis->setLabels($labels);
|
|
||||||
|
|
||||||
# Draw the ticks between label positions (instead of at label positions)
|
|
||||||
$c->xAxis->setTickOffset(0.5);
|
|
||||||
|
|
||||||
# When auto-scaling, use tick spacing of 40 pixels as a guideline
|
|
||||||
$c->yAxis->setTickDensity(40);
|
|
||||||
|
|
||||||
# Add a title to the y axis with 12pts Times Bold Italic font
|
|
||||||
$c->yAxis->setTitle("USD (millions)", "timesbi.ttf", 12);
|
|
||||||
|
|
||||||
# Set axis label style to 8pts Arial Bold
|
|
||||||
$c->xAxis->setLabelStyle("arialbd.ttf", 8);
|
|
||||||
$c->yAxis->setLabelStyle("arialbd.ttf", 8);
|
|
||||||
|
|
||||||
# Set axis line width to 2 pixels
|
|
||||||
$c->xAxis->setWidth(2);
|
|
||||||
$c->yAxis->setWidth(2);
|
|
||||||
|
|
||||||
# Create the image and save it in a temporary location
|
|
||||||
$chart1URL = $c->makeSession("chart1");
|
|
||||||
|
|
||||||
# Create an image map for the chart
|
|
||||||
$imageMap = $c->getHTMLImageMap("clickline.php", "",
|
|
||||||
"title='{xLabel}: US\$ {value|0}M'");
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<body topmargin="5" leftmargin="5" rightmargin="0" marginwidth="5" marginheight="5">
|
|
||||||
<div style="font-size:18pt; font-family:verdana; font-weight:bold">
|
|
||||||
Simple Clickable Bar Chart
|
|
||||||
</div>
|
|
||||||
<hr color="#000080">
|
|
||||||
<div style="font-size:10pt; font-family:verdana; margin-bottom:20">
|
|
||||||
<a href="viewsource.php?file=<?php echo $_SERVER["SCRIPT_NAME"]?>">View Source Code</a>
|
|
||||||
</div>
|
|
||||||
<img src="getchart.php?<?php echo $chart1URL?>" border="0" usemap="#map1">
|
|
||||||
<map name="map1">
|
|
||||||
<?php echo $imageMap?>
|
|
||||||
</map>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,94 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# Get the selected year.
|
|
||||||
$selectedYear = $_REQUEST["xLabel"];
|
|
||||||
|
|
||||||
#
|
|
||||||
# In this demo, we just split the annual revenue into 12 months using random ratios.
|
|
||||||
# In real life, the data can come from a database based on selectedYear.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Get the annual revenue
|
|
||||||
$annualRevenue = $_REQUEST["value"];
|
|
||||||
|
|
||||||
# Split into 12 months
|
|
||||||
srand((int)($selectedYear));
|
|
||||||
$data = array_pad(array(), 12, 0);
|
|
||||||
for($i = 0; $i < 11; ++$i) {
|
|
||||||
$data[$i] = $annualRevenue * (rand() / getrandmax() * 0.6 + 0.6) / (12 - $i);
|
|
||||||
$annualRevenue = $annualRevenue - $data[$i];
|
|
||||||
}
|
|
||||||
$data[11] = $annualRevenue;
|
|
||||||
|
|
||||||
#
|
|
||||||
# Now we obtain the data into arrays, we can start to draw the chart using
|
|
||||||
# ChartDirector
|
|
||||||
#
|
|
||||||
|
|
||||||
# Create a XYChart object of size 600 x 320 pixels
|
|
||||||
$c = new XYChart(600, 360);
|
|
||||||
|
|
||||||
# Add a title to the chart using 18pts Times Bold Italic font
|
|
||||||
$c->addTitle("Month Revenue for Star Tech for $selectedYear", "timesbi.ttf", 18);
|
|
||||||
|
|
||||||
# Set the plotarea at (60, 40) and of size 500 x 280 pixels. Use a vertical gradient
|
|
||||||
# color from light blue (eeeeff) to deep blue (0000cc) as background. Set border and
|
|
||||||
# grid lines to white (ffffff).
|
|
||||||
$c->setPlotArea(60, 40, 500, 280, $c->linearGradientColor(60, 40, 60, 280, 0xeeeeff,
|
|
||||||
0x0000cc), -1, 0xffffff, 0xffffff);
|
|
||||||
|
|
||||||
# Add a red line (ff0000) chart layer using the data
|
|
||||||
$lineLayerObj = $c->addLineLayer();
|
|
||||||
$dataSet = $lineLayerObj->addDataSet($data, 0xff0000, "Revenue");
|
|
||||||
|
|
||||||
# Set the line width to 3 pixels
|
|
||||||
$dataSet->setLineWidth(3);
|
|
||||||
|
|
||||||
# Use a 13 point circle symbol to plot the data points
|
|
||||||
$dataSet->setDataSymbol(CircleSymbol, 13);
|
|
||||||
|
|
||||||
# Set the labels on the x axis. In this example, the labels must be Jan - Dec.
|
|
||||||
$labels = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept",
|
|
||||||
"Oct", "Nov", "Dec");
|
|
||||||
$c->xAxis->setLabels($labels);
|
|
||||||
|
|
||||||
# When auto-scaling, use tick spacing of 40 pixels as a guideline
|
|
||||||
$c->yAxis->setTickDensity(40);
|
|
||||||
|
|
||||||
# Add a title to the x axis to reflect the selected year
|
|
||||||
$c->xAxis->setTitle("Year $selectedYear", "timesbi.ttf", 12);
|
|
||||||
|
|
||||||
# Add a title to the y axis
|
|
||||||
$c->yAxis->setTitle("USD (millions)", "timesbi.ttf", 12);
|
|
||||||
|
|
||||||
# Set axis label style to 8pts Arial Bold
|
|
||||||
$c->xAxis->setLabelStyle("arialbd.ttf", 8);
|
|
||||||
$c->yAxis->setLabelStyle("arialbd.ttf", 8);
|
|
||||||
|
|
||||||
# Set axis line width to 2 pixels
|
|
||||||
$c->xAxis->setWidth(2);
|
|
||||||
$c->yAxis->setWidth(2);
|
|
||||||
|
|
||||||
# Create the image and save it in a temporary location
|
|
||||||
$chart1URL = $c->makeSession("chart1");
|
|
||||||
|
|
||||||
# Create an image map for the chart
|
|
||||||
$imageMap = $c->getHTMLImageMap("clickpie.php?year=$selectedYear", "",
|
|
||||||
"title='{xLabel}: US\$ {value|0}M'");
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<body topmargin="5" leftmargin="5" rightmargin="0" marginwidth="5" marginheight="5">
|
|
||||||
<div style="font-size:18pt; font-family:verdana; font-weight:bold">
|
|
||||||
Simple Clickable Line Chart
|
|
||||||
</div>
|
|
||||||
<hr color="#000080">
|
|
||||||
<div style="font-size:10pt; font-family:verdana; margin-bottom:20">
|
|
||||||
<a href="viewsource.php?file=<?php echo $_SERVER["SCRIPT_NAME"]?>">View Source Code</a>
|
|
||||||
</div>
|
|
||||||
<img src="getchart.php?<?php echo $chart1URL?>" border="0" usemap="#map1">
|
|
||||||
<map name="map1">
|
|
||||||
<?php echo $imageMap?>
|
|
||||||
</map>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,78 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# Get the selected year and month
|
|
||||||
$selectedYear = (int)($_REQUEST["year"]);
|
|
||||||
$selectedMonth = (int)($_REQUEST["x"]) + 1;
|
|
||||||
|
|
||||||
#
|
|
||||||
# In this demo, we just split the monthly revenue into 3 parts using random ratios.
|
|
||||||
# In real life, the data probably can come from a database based on selectedYear and
|
|
||||||
# selectedMonth.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Get the monthly revenue
|
|
||||||
$monthlyRevenue = $_REQUEST["value"];
|
|
||||||
|
|
||||||
# Split into 3 parts
|
|
||||||
srand($selectedMonth * 2000 + $selectedYear);
|
|
||||||
$data = array_pad(array(), 4, 0);
|
|
||||||
$data[0] = (rand() / getrandmax() * 0.1 + 0.3) * $monthlyRevenue;
|
|
||||||
$data[1] = (rand() / getrandmax() * 0.1 + 0.2) * ($monthlyRevenue - $data[0]);
|
|
||||||
$data[2] = (rand() / getrandmax() * 0.4 + 0.3) * ($monthlyRevenue - $data[0] - $data[
|
|
||||||
1]);
|
|
||||||
$data[3] = $monthlyRevenue - $data[0] - $data[1] - $data[2];
|
|
||||||
|
|
||||||
# The labels for the pie chart
|
|
||||||
$labels = array("Services", "Hardware", "Software", "Others");
|
|
||||||
|
|
||||||
# Create a PieChart object of size 600 x 240 pixels
|
|
||||||
$c = new PieChart(600, 280);
|
|
||||||
|
|
||||||
# Set the center of the pie at (300, 140) and the radius to 120 pixels
|
|
||||||
$c->setPieSize(300, 140, 120);
|
|
||||||
|
|
||||||
# Add a title to the pie chart using 18 pts Times Bold Italic font
|
|
||||||
$c->addTitle("Revenue Breakdown for $selectedMonth/$selectedYear", "timesbi.ttf", 18)
|
|
||||||
;
|
|
||||||
|
|
||||||
# Draw the pie in 3D with 20 pixels 3D depth
|
|
||||||
$c->set3D(20);
|
|
||||||
|
|
||||||
# Set label format to display sector label, value and percentage in two lines
|
|
||||||
$c->setLabelFormat("{label}<*br*>\${value|2}M ({percent}%)");
|
|
||||||
|
|
||||||
# Set label style to 10 pts Arial Bold Italic font. Set background color to the same
|
|
||||||
# as the sector color, with reduced-glare glass effect and rounded corners.
|
|
||||||
$t = $c->setLabelStyle("arialbi.ttf", 10);
|
|
||||||
$t->setBackground(SameAsMainColor, Transparent, glassEffect(ReducedGlare));
|
|
||||||
$t->setRoundedCorners();
|
|
||||||
|
|
||||||
# Use side label layout method
|
|
||||||
$c->setLabelLayout(SideLayout);
|
|
||||||
|
|
||||||
# Set the pie data and the pie labels
|
|
||||||
$c->setData($data, $labels);
|
|
||||||
|
|
||||||
# Create the image and save it in a temporary location
|
|
||||||
$chart1URL = $c->makeSession("chart1");
|
|
||||||
|
|
||||||
# Create an image map for the chart
|
|
||||||
$imageMap = $c->getHTMLImageMap("piestub.php", "", "title='{label}:US\$ {value|2}M'")
|
|
||||||
;
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<body topmargin="5" leftmargin="5" rightmargin="0" marginwidth="5" marginheight="5">
|
|
||||||
<div style="font-size:18pt; font-family:verdana; font-weight:bold">
|
|
||||||
Simple Clickable Pie Chart
|
|
||||||
</div>
|
|
||||||
<hr color="#000080">
|
|
||||||
<div style="font-size:10pt; font-family:verdana; margin-bottom:20">
|
|
||||||
<a href="viewsource.php?file=<?php echo $_SERVER["SCRIPT_NAME"]?>">View Source Code</a>
|
|
||||||
</div>
|
|
||||||
<img src="getchart.php?<?php echo $chart1URL?>" border="0" usemap="#map1">
|
|
||||||
<map name="map1">
|
|
||||||
<?php echo $imageMap?>
|
|
||||||
</map>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Binary file not shown.
Before Width: | Height: | Size: 261 B |
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
@ -1,36 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the bar chart
|
|
||||||
$data = array(85, 156, 179.5, 211, 123);
|
|
||||||
|
|
||||||
# The labels for the bar chart
|
|
||||||
$labels = array("Mon", "Tue", "Wed", "Thu", "Fri");
|
|
||||||
|
|
||||||
# The colors for the bar chart
|
|
||||||
$colors = array(0xb8bc9c, 0xa0bdc4, 0x999966, 0x333366, 0xc3c3e6);
|
|
||||||
|
|
||||||
# Create a XYChart object of size 300 x 220 pixels. Use golden background color. Use
|
|
||||||
# a 2 pixel 3D border.
|
|
||||||
$c = new XYChart(300, 220, goldColor(), -1, 2);
|
|
||||||
|
|
||||||
# Add a title box using 10 point Arial Bold font. Set the background color to
|
|
||||||
# metallic blue (9999FF) Use a 1 pixel 3D border.
|
|
||||||
$textBoxObj = $c->addTitle("Daily Network Load", "arialbd.ttf", 10);
|
|
||||||
$textBoxObj->setBackground(metalColor(0x9999ff), -1, 1);
|
|
||||||
|
|
||||||
# Set the plotarea at (40, 40) and of 240 x 150 pixels in size
|
|
||||||
$c->setPlotArea(40, 40, 240, 150);
|
|
||||||
|
|
||||||
# Add a multi-color bar chart layer using the given data and colors. Use a 1 pixel 3D
|
|
||||||
# border for the bars.
|
|
||||||
$barLayerObj = $c->addBarLayer3($data, $colors);
|
|
||||||
$barLayerObj->setBorderColor(-1, 1);
|
|
||||||
|
|
||||||
# Set the labels on the x axis.
|
|
||||||
$c->xAxis->setLabels($labels);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,100 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The tasks for the gantt chart
|
|
||||||
$labels = array("Market Research", "Define Specifications", "Overall Archiecture",
|
|
||||||
"Project Planning", "Detail Design", "Software Development", "Test Plan",
|
|
||||||
"Testing and QA", "User Documentation");
|
|
||||||
|
|
||||||
# The task index, start date, end date and color for each bar
|
|
||||||
$taskNo = array(0, 0, 1, 2, 3, 4, 5, 6, 6, 7, 8, 8);
|
|
||||||
$startDate = array(chartTime(2004, 8, 16), chartTime(2004, 10, 4), chartTime(2004, 8,
|
|
||||||
30), chartTime(2004, 9, 13), chartTime(2004, 9, 20), chartTime(2004, 9, 27),
|
|
||||||
chartTime(2004, 10, 4), chartTime(2004, 10, 4), chartTime(2004, 10, 25),
|
|
||||||
chartTime(2004, 11, 1), chartTime(2004, 10, 18), chartTime(2004, 11, 8));
|
|
||||||
$endDate = array(chartTime(2004, 8, 30), chartTime(2004, 10, 18), chartTime(2004, 9,
|
|
||||||
13), chartTime(2004, 9, 27), chartTime(2004, 10, 4), chartTime(2004, 10, 11),
|
|
||||||
chartTime(2004, 11, 8), chartTime(2004, 10, 18), chartTime(2004, 11, 8),
|
|
||||||
chartTime(2004, 11, 22), chartTime(2004, 11, 1), chartTime(2004, 11, 22));
|
|
||||||
$colors = array(0x00cc00, 0x00cc00, 0x00cc00, 0x0000cc, 0x0000cc, 0xcc0000, 0xcc0000,
|
|
||||||
0x0000cc, 0xcc0000, 0xcc0000, 0x00cc00, 0xcc0000);
|
|
||||||
|
|
||||||
# Create a XYChart object of size 620 x 325 pixels. Set background color to light red
|
|
||||||
# (0xffcccc), with 1 pixel 3D border effect.
|
|
||||||
$c = new XYChart(620, 325, 0xffcccc, 0x000000, 1);
|
|
||||||
|
|
||||||
# Add a title to the chart using 15 points Times Bold Itatic font, with white
|
|
||||||
# (ffffff) text on a dark red (800000) background
|
|
||||||
$textBoxObj = $c->addTitle("Mutli-Color Gantt Chart Demo", "timesbi.ttf", 15,
|
|
||||||
0xffffff);
|
|
||||||
$textBoxObj->setBackground(0x800000);
|
|
||||||
|
|
||||||
# Set the plotarea at (140, 55) and of size 460 x 200 pixels. Use alternative
|
|
||||||
# white/grey background. Enable both horizontal and vertical grids by setting their
|
|
||||||
# colors to grey (c0c0c0). Set vertical major grid (represents month boundaries) 2
|
|
||||||
# pixels in width
|
|
||||||
$plotAreaObj = $c->setPlotArea(140, 55, 460, 200, 0xffffff, 0xeeeeee, LineColor,
|
|
||||||
0xc0c0c0, 0xc0c0c0);
|
|
||||||
$plotAreaObj->setGridWidth(2, 1, 1, 1);
|
|
||||||
|
|
||||||
# swap the x and y axes to create a horziontal box-whisker chart
|
|
||||||
$c->swapXY();
|
|
||||||
|
|
||||||
# Set the y-axis scale to be date scale from Aug 16, 2004 to Nov 22, 2004, with ticks
|
|
||||||
# every 7 days (1 week)
|
|
||||||
$c->yAxis->setDateScale(chartTime(2004, 8, 16), chartTime(2004, 11, 22), 86400 * 7);
|
|
||||||
|
|
||||||
# Set multi-style axis label formatting. Month labels are in Arial Bold font in "mmm
|
|
||||||
# d" format. Weekly labels just show the day of month and use minor tick (by using
|
|
||||||
# '-' as first character of format string).
|
|
||||||
$c->yAxis->setMultiFormat(StartOfMonthFilter(), "<*font=arialbd.ttf*>{value|mmm d}",
|
|
||||||
StartOfDayFilter(), "-{value|d}");
|
|
||||||
|
|
||||||
# Set the y-axis to shown on the top (right + swapXY = top)
|
|
||||||
$c->setYAxisOnRight();
|
|
||||||
|
|
||||||
# Set the labels on the x axis
|
|
||||||
$c->xAxis->setLabels($labels);
|
|
||||||
|
|
||||||
# Reverse the x-axis scale so that it points downwards.
|
|
||||||
$c->xAxis->setReverse();
|
|
||||||
|
|
||||||
# Set the horizontal ticks and grid lines to be between the bars
|
|
||||||
$c->xAxis->setTickOffset(0.5);
|
|
||||||
|
|
||||||
# Add some symbols to the chart to represent milestones. The symbols are added using
|
|
||||||
# scatter layers. We need to specify the task index, date, name, symbol shape, size
|
|
||||||
# and color.
|
|
||||||
$c->addScatterLayer(array(1), array(chartTime(2004, 9, 13)), "Milestone 1",
|
|
||||||
Cross2Shape(), 13, 0xffff00);
|
|
||||||
$c->addScatterLayer(array(3), array(chartTime(2004, 10, 4)), "Milestone 2",
|
|
||||||
StarShape(5), 15, 0xff00ff);
|
|
||||||
$c->addScatterLayer(array(5), array(chartTime(2004, 11, 8)), "Milestone 3",
|
|
||||||
TriangleSymbol, 13, 0xff9933);
|
|
||||||
|
|
||||||
# Add a multi-color box-whisker layer to represent the gantt bars
|
|
||||||
$layer = $c->addBoxWhiskerLayer2($startDate, $endDate, null, null, null, $colors);
|
|
||||||
$layer->setXData($taskNo);
|
|
||||||
$layer->setBorderColor(SameAsMainColor);
|
|
||||||
|
|
||||||
# Divide the plot area height ( = 200 in this chart) by the number of tasks to get
|
|
||||||
# the height of each slot. Use 80% of that as the bar height.
|
|
||||||
$layer->setDataWidth((int)(200 * 4 / 5 / count($labels)));
|
|
||||||
|
|
||||||
# Add a legend box at (140, 265) - bottom of the plot area. Use 8 pts Arial Bold as
|
|
||||||
# the font with auto-grid layout. Set the width to the same width as the plot area.
|
|
||||||
# Set the backgorund to grey (dddddd).
|
|
||||||
$legendBox = $c->addLegend2(140, 265, AutoGrid, "arialbd.ttf", 8);
|
|
||||||
$legendBox->setWidth(461);
|
|
||||||
$legendBox->setBackground(0xdddddd);
|
|
||||||
|
|
||||||
# The keys for the scatter layers (milestone symbols) will automatically be added to
|
|
||||||
# the legend box. We just need to add keys to show the meanings of the bar colors.
|
|
||||||
$legendBox->addKey("Market Team", 0x00cc00);
|
|
||||||
$legendBox->addKey("Planning Team", 0x0000cc);
|
|
||||||
$legendBox->addKey("Development Team", 0xcc0000);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,54 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the pie chart
|
|
||||||
$data = array(25, 18, 15, 12, 8, 30, 35);
|
|
||||||
|
|
||||||
# The labels for the pie chart
|
|
||||||
$labels = array("Labor", "Licenses", "Taxes", "Legal", "Insurance", "Facilities",
|
|
||||||
"Production");
|
|
||||||
|
|
||||||
# Colors of the sectors if custom coloring is used
|
|
||||||
$colors = array(0xb8bc9c, 0xecf0b9, 0x999966, 0x333366, 0xc3c3e6, 0x594330, 0xa0bdc4)
|
|
||||||
;
|
|
||||||
|
|
||||||
# Create a PieChart object of size 280 x 240 pixels
|
|
||||||
$c = new PieChart(280, 240);
|
|
||||||
|
|
||||||
# Set the center of the pie at (140, 120) and the radius to 80 pixels
|
|
||||||
$c->setPieSize(140, 120, 80);
|
|
||||||
|
|
||||||
# Draw the pie in 3D
|
|
||||||
$c->set3D();
|
|
||||||
|
|
||||||
# Set the coloring schema
|
|
||||||
if ($_REQUEST["img"] == "0") {
|
|
||||||
$c->addTitle("Custom Colors");
|
|
||||||
# set the LineColor to light gray
|
|
||||||
$c->setColor(LineColor, 0xc0c0c0);
|
|
||||||
# use given color array as the data colors (sector colors)
|
|
||||||
$c->setColors2(DataColor, $colors);
|
|
||||||
} else if ($_REQUEST["img"] == "1") {
|
|
||||||
$c->addTitle("Dark Background Colors");
|
|
||||||
# use the standard white on black palette
|
|
||||||
$c->setColors($whiteOnBlackPalette);
|
|
||||||
} else if ($_REQUEST["img"] == "2") {
|
|
||||||
$c->addTitle("Wallpaper As Background");
|
|
||||||
$c->setWallpaper(dirname(__FILE__)."/bg.png");
|
|
||||||
} else {
|
|
||||||
$c->addTitle("Transparent Colors");
|
|
||||||
$c->setWallpaper(dirname(__FILE__)."/bg.png");
|
|
||||||
# use semi-transparent colors to allow the background to be seen
|
|
||||||
$c->setColors($transparentPalette);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set the pie data and the pie labels
|
|
||||||
$c->setData($data, $labels);
|
|
||||||
|
|
||||||
# Explode the 1st sector (index = 0)
|
|
||||||
$c->setExplode(0);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(GIF));
|
|
||||||
?>
|
|
@ -1,65 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
#
|
|
||||||
# We use a random number generator to simulate the data from 9:30am to 4:30pm with
|
|
||||||
# one data point every 4 minutes. The total number of points during that period is
|
|
||||||
# 106. (7 hours x 15 points/hour + 1)
|
|
||||||
#
|
|
||||||
$noOfPoints = 106;
|
|
||||||
|
|
||||||
# Assume we have not reached the end of the day yet, and only 85 points are
|
|
||||||
# available. Create a random table object of 1 col x 85 rows, using 9 as seed.
|
|
||||||
$rantable = new RanTable(9, 1, 85);
|
|
||||||
|
|
||||||
# Set the 1st column to start with 1800 and with random delta from -5 to 5.
|
|
||||||
$rantable->setCol(0, 1800, -5, 5);
|
|
||||||
|
|
||||||
# Get the data as the 1st column of the random table
|
|
||||||
$data = $rantable->getCol(0);
|
|
||||||
|
|
||||||
# The x-axis labels for the chart
|
|
||||||
$labels = array("-", "10am", "-", " ", "-", "12am", "-", " ", "-", "2pm", "-", " ",
|
|
||||||
"-", "4pm", "-");
|
|
||||||
|
|
||||||
#
|
|
||||||
# Now we obtain the data into arrays, we can start to draw the chart using
|
|
||||||
# ChartDirector
|
|
||||||
#
|
|
||||||
|
|
||||||
# Create a XYChart object of size 180 x 180 pixels with a blue background (0x9c9cce)
|
|
||||||
$c = new XYChart(180, 180, 0x9c9cce);
|
|
||||||
|
|
||||||
# Add titles to the top and bottom of the chart using 7.5pt Arial font. The text is
|
|
||||||
# white 0xffffff on a deep blue 0x31319C background.
|
|
||||||
$c->addTitle2(Top, "STAR TECH INDEX 2003-01-28", "arial.ttf", 7.5, 0xffffff,
|
|
||||||
0x31319c);
|
|
||||||
$c->addTitle2(Bottom, "LATEST STI:1809.41 (+14.51)", "arial.ttf", 7.5, 0xffffff,
|
|
||||||
0x31319c);
|
|
||||||
|
|
||||||
# Set the plotarea at (31, 21) and of size 145 x 124 pixels, with a pale yellow
|
|
||||||
# (0xffffc8) background.
|
|
||||||
$c->setPlotArea(31, 21, 145, 124, 0xffffc8);
|
|
||||||
|
|
||||||
# Add custom text at (176, 21) (top right corner of plotarea) using 11pt Times Bold
|
|
||||||
# Italic font/red (0xc09090) color
|
|
||||||
$textBoxObj = $c->addText(176, 21, "Chart Demo", "timesbi.ttf", 11, 0xc09090);
|
|
||||||
$textBoxObj->setAlignment(TopRight);
|
|
||||||
|
|
||||||
# Use 7.5 pts Arial as the y axis label font
|
|
||||||
$c->yAxis->setLabelStyle("", 7.5);
|
|
||||||
|
|
||||||
# Set the labels on the x axis by spreading the labels evenly between the first point
|
|
||||||
# (index = 0) and the last point (index = noOfPoints - 1)
|
|
||||||
$c->xAxis->setLinearScale(0, $noOfPoints - 1, $labels);
|
|
||||||
|
|
||||||
# Use 7.5 pts Arial as the x axis label font
|
|
||||||
$c->xAxis->setLabelStyle("", 7.5);
|
|
||||||
|
|
||||||
# Add a deep blue (0x000080) line layer to the chart
|
|
||||||
$c->addLineLayer($data, 0x000080);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
Binary file not shown.
Before Width: | Height: | Size: 325 B |
@ -1,103 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# Data for outer ring
|
|
||||||
$data = array(88, 124, 96);
|
|
||||||
|
|
||||||
# Data for inner ring
|
|
||||||
$data2 = array(77, 87, 45);
|
|
||||||
|
|
||||||
# Labels for the sectors
|
|
||||||
$labels = array("Hardware", "Software", "Services");
|
|
||||||
|
|
||||||
# Colors for the sectors
|
|
||||||
$colors = array(0xff9999, 0x9999ff, 0x66ff66);
|
|
||||||
|
|
||||||
#
|
|
||||||
# Create the main chart, which contains the chart title, the outer ring, and the
|
|
||||||
# legend box
|
|
||||||
#
|
|
||||||
|
|
||||||
# Create a PieChart object of size 450 x 360 pixels, with transparent background
|
|
||||||
$c = new PieChart(450, 360);
|
|
||||||
|
|
||||||
# Add a title to the chart with 18pts Times Bold Italic font
|
|
||||||
$c->addTitle("Concentric Donut Chart", "timesbi.ttf", 18);
|
|
||||||
|
|
||||||
# Set donut center at (160, 200), and outer/inner radii as 150/100 pixels
|
|
||||||
$c->setDonutSize(160, 200, 150, 100);
|
|
||||||
|
|
||||||
# Add a label at the bottom-right corner of the ring to label the outer ring Use
|
|
||||||
# 12pts Arial Bold Italic font in white (ffffff) color, on a green (008800)
|
|
||||||
# background, with soft lighting effect and 5 pixels rounded corners
|
|
||||||
$t = $c->addText(260, 300, " Year 2006 ", "arialbi.ttf", 12, 0xffffff);
|
|
||||||
$t->setBackground(0x008800, Transparent, softLighting());
|
|
||||||
$t->setRoundedCorners(5);
|
|
||||||
|
|
||||||
# Set the legend box at (320, 50) with 12 pts Arial Bold Italic font, with no border
|
|
||||||
$legendObj = $c->addLegend(320, 50, true, "arialbi.ttf", 13);
|
|
||||||
$legendObj->setBackground(Transparent, Transparent);
|
|
||||||
|
|
||||||
# Set the pie data and the pie labels
|
|
||||||
$c->setData($data, $labels);
|
|
||||||
|
|
||||||
# Set the pie colors
|
|
||||||
$c->setColors2(DataColor, $colors);
|
|
||||||
|
|
||||||
# Set pie border color to white (ffffff)
|
|
||||||
$c->setLineColor(0xffffff);
|
|
||||||
|
|
||||||
# Set pie label to value in $###M format, percentage in (##.#%) format, in two lines.
|
|
||||||
$c->setLabelFormat("\${value}M<*br*>({percent|1}%)");
|
|
||||||
|
|
||||||
# Use 10pts Airal Bold for the sector labels
|
|
||||||
$c->setLabelStyle("arialbd.ttf", 10);
|
|
||||||
|
|
||||||
# Set the label position to -25 pixels from the sector (which would be internal to
|
|
||||||
# the sector)
|
|
||||||
$c->setLabelPos(-25);
|
|
||||||
|
|
||||||
#
|
|
||||||
# Create the inner ring.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Create a PieChart object of size 280 x 320 pixels, with transparent background
|
|
||||||
$c2 = new PieChart(280, 320, Transparent);
|
|
||||||
|
|
||||||
# Set donut center at (110, 110), and outer/inner radii as 100/50 pixels
|
|
||||||
$c2->setDonutSize(110, 110, 100, 50);
|
|
||||||
|
|
||||||
# Add a label at the center of the ring to label the inner ring. Use 12pts Arial Bold
|
|
||||||
# Italic font in white (ffffff) color, on a deep blue (0000cc) background, with soft
|
|
||||||
# lighting effect and 5 pixels rounded corners
|
|
||||||
$t2 = $c2->addText(110, 110, " Year 2005 ", "arialbi.ttf", 12, 0xffffff, Center);
|
|
||||||
$t2->setBackground(0x0000cc, Transparent, softLighting());
|
|
||||||
$t2->setRoundedCorners(5);
|
|
||||||
|
|
||||||
# Set the pie data and the pie labels
|
|
||||||
$c2->setData($data2, $labels);
|
|
||||||
|
|
||||||
# Set the pie colors
|
|
||||||
$c2->setColors2(DataColor, $colors);
|
|
||||||
|
|
||||||
# Set pie border color to white (ffffff)
|
|
||||||
$c2->setLineColor(0xffffff);
|
|
||||||
|
|
||||||
# Set pie label to value in $###M format, percentage in (##.#%) format, in two lines.
|
|
||||||
$c2->setLabelFormat("\${value}M<*br*>({percent|1}%)");
|
|
||||||
|
|
||||||
# Use 10pts Airal Bold for the sector labels
|
|
||||||
$c2->setLabelStyle("arialbd.ttf", 10);
|
|
||||||
|
|
||||||
# Set the label position to -25 pixels from the sector (which would be internal to
|
|
||||||
# the sector)
|
|
||||||
$c2->setLabelPos(-25);
|
|
||||||
|
|
||||||
# merge the inner ring into the outer ring at (50, 90)
|
|
||||||
$makeChartObj = $c->makeChart3();
|
|
||||||
$makeChartObj->merge($c2->makeChart3(), 50, 90, TopLeft, 0);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,72 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The XY data of the first data series
|
|
||||||
$dataX = array(50, 55, 37, 24, 42, 49, 63, 72, 83, 59);
|
|
||||||
$dataY = array(3.6, 2.8, 2.5, 2.3, 3.8, 3.0, 3.8, 5.0, 6.0, 3.3);
|
|
||||||
|
|
||||||
# Create a XYChart object of size 450 x 420 pixels
|
|
||||||
$c = new XYChart(450, 420);
|
|
||||||
|
|
||||||
# Set the plotarea at (55, 65) and of size 350 x 300 pixels, with white background
|
|
||||||
# and a light grey border (0xc0c0c0). Turn on both horizontal and vertical grid lines
|
|
||||||
# with light grey color (0xc0c0c0)
|
|
||||||
$c->setPlotArea(55, 65, 350, 300, 0xffffff, -1, 0xc0c0c0, 0xc0c0c0, -1);
|
|
||||||
|
|
||||||
# Add a title to the chart using 18 point Times Bold Itatic font.
|
|
||||||
$c->addTitle("Server Performance", "timesbi.ttf", 18);
|
|
||||||
|
|
||||||
# Add a title to the y axis using 12 pts Arial Bold Italic font
|
|
||||||
$c->yAxis->setTitle("Response Time (sec)", "arialbi.ttf", 12);
|
|
||||||
|
|
||||||
# Set the y axis line width to 3 pixels
|
|
||||||
$c->yAxis->setWidth(3);
|
|
||||||
|
|
||||||
# Set the y axis label format to show 1 decimal point
|
|
||||||
$c->yAxis->setLabelFormat("{value|1}");
|
|
||||||
|
|
||||||
# Add a title to the x axis using 12 pts Arial Bold Italic font
|
|
||||||
$c->xAxis->setTitle("Server Load (TPS)", "arialbi.ttf", 12);
|
|
||||||
|
|
||||||
# Set the x axis line width to 3 pixels
|
|
||||||
$c->xAxis->setWidth(3);
|
|
||||||
|
|
||||||
# Add a scatter layer using (dataX, dataY)
|
|
||||||
$c->addScatterLayer($dataX, $dataY, "", DiamondSymbol, 11, 0x008000);
|
|
||||||
|
|
||||||
# Add a trend line layer for (dataX, dataY)
|
|
||||||
$trendLayer = $c->addTrendLayer2($dataX, $dataY, 0x008000);
|
|
||||||
|
|
||||||
# Set the line width to 3 pixels
|
|
||||||
$trendLayer->setLineWidth(3);
|
|
||||||
|
|
||||||
# Add a 95% confidence band for the line
|
|
||||||
$trendLayer->addConfidenceBand(0.95, 0x806666ff);
|
|
||||||
|
|
||||||
# Add a 95% confidence band (prediction band) for the points
|
|
||||||
$trendLayer->addPredictionBand(0.95, 0x8066ff66);
|
|
||||||
|
|
||||||
# Add a legend box at (50, 30) (top of the chart) with horizontal layout. Use 10 pts
|
|
||||||
# Arial Bold Italic font. Set the background and border color to Transparent.
|
|
||||||
$legendBox = $c->addLegend(50, 30, false, "arialbi.ttf", 10);
|
|
||||||
$legendBox->setBackground(Transparent);
|
|
||||||
|
|
||||||
# Add entries to the legend box
|
|
||||||
$legendBox->addKey("95% Line Confidence", 0x806666ff);
|
|
||||||
$legendBox->addKey("95% Point Confidence", 0x8066ff66);
|
|
||||||
|
|
||||||
# Display the trend line parameters as a text table formatted using CDML
|
|
||||||
$textbox = $c->addText(56, 65, sprintf(
|
|
||||||
"<*block*>Slope\nIntercept\nCorrelation\nStd Error<*/*> <*block*>%.4f ".
|
|
||||||
"sec/tps\n%.4f sec\n%.4f\n%.4f sec<*/*>", $trendLayer->getSlope(),
|
|
||||||
$trendLayer->getIntercept(), $trendLayer->getCorrelation(),
|
|
||||||
$trendLayer->getStdError()), "arialbd.ttf", 8);
|
|
||||||
|
|
||||||
# Set the background of the text box to light grey, with a black border, and 1 pixel
|
|
||||||
# 3D border
|
|
||||||
$textbox->setBackground(0xc0c0c0, 0, 1);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,61 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# Use random table to generate a random series. The random table is set to 1 col x 51
|
|
||||||
# rows, with 9 as the seed
|
|
||||||
$rantable = new RanTable(9, 1, 51);
|
|
||||||
|
|
||||||
# Set the 1st column to start from 100, with changes between rows from -5 to +5
|
|
||||||
$rantable->setCol(0, 100, -5, 5);
|
|
||||||
|
|
||||||
# Get the 1st column of the random table as the data set
|
|
||||||
$data = $rantable->getCol(0);
|
|
||||||
|
|
||||||
# Create a XYChart object of size 600 x 300 pixels
|
|
||||||
$c = new XYChart(600, 300);
|
|
||||||
|
|
||||||
# Set the plotarea at (50, 35) and of size 500 x 240 pixels. Enable both the
|
|
||||||
# horizontal and vertical grids by setting their colors to grey (0xc0c0c0)
|
|
||||||
$plotAreaObj = $c->setPlotArea(50, 35, 500, 240);
|
|
||||||
$plotAreaObj->setGridColor(0xc0c0c0, 0xc0c0c0);
|
|
||||||
|
|
||||||
# Add a title to the chart using 18 point Times Bold Itatic font.
|
|
||||||
$c->addTitle("LOWESS Generic Curve Fitting Algorithm", "timesbi.ttf", 18);
|
|
||||||
|
|
||||||
# Set the y axis line width to 3 pixels
|
|
||||||
$c->yAxis->setWidth(3);
|
|
||||||
|
|
||||||
# Add a title to the x axis using 12 pts Arial Bold Italic font
|
|
||||||
$c->xAxis->setTitle("Server Load (TPS)", "arialbi.ttf", 12);
|
|
||||||
|
|
||||||
# Set the x axis line width to 3 pixels
|
|
||||||
$c->xAxis->setWidth(3);
|
|
||||||
|
|
||||||
# Set the x axis scale from 0 - 50, with major tick every 5 units and minor tick
|
|
||||||
# every 1 unit
|
|
||||||
$c->xAxis->setLinearScale(0, 50, 5, 1);
|
|
||||||
|
|
||||||
# Add a blue layer to the chart
|
|
||||||
$layer = $c->addLineLayer2();
|
|
||||||
|
|
||||||
# Add a red (0x80ff0000) data set to the chart with square symbols
|
|
||||||
$dataSetObj = $layer->addDataSet($data, 0x80ff0000);
|
|
||||||
$dataSetObj->setDataSymbol(SquareSymbol);
|
|
||||||
|
|
||||||
# Set the line width to 2 pixels
|
|
||||||
$layer->setLineWidth(2);
|
|
||||||
|
|
||||||
# Use lowess for curve fitting, and plot the fitted data using a spline layer with
|
|
||||||
# line width set to 3 pixels
|
|
||||||
$curve = new ArrayMath($data);
|
|
||||||
$curve->lowess();
|
|
||||||
$splineLayerObj = $c->addSplineLayer($curve->result(), 0x0000ff);
|
|
||||||
$splineLayerObj->setLineWidth(3);
|
|
||||||
|
|
||||||
# Set zero affinity to 0 to make sure the line is displayed in the most detail scale
|
|
||||||
$c->yAxis->setAutoScale(0, 0, 0);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,120 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the line chart
|
|
||||||
$data0 = array(50, 55, 47, 36, 42, 49, 63, 62, 73, 59, 56, 50, 64, 60, 67, 67, 58,
|
|
||||||
59, 73, 77, 84, 82, 80, 84);
|
|
||||||
$data1 = array(36, 28, 25, 33, 38, 20, 22, 30, 25, 33, 30, 24, 28, 36, 30, 45, 46,
|
|
||||||
42, 48, 45, 43, 52, 64, 70);
|
|
||||||
|
|
||||||
# The labels for the line chart
|
|
||||||
$labels = array("Jan-04", "Feb-04", "Mar-04", "Apr-04", "May-04", "Jun-04", "Jul-04",
|
|
||||||
"Aug-04", "Sep-04", "Oct-04", "Nov-04", "Dec-04", "Jan-05", "Feb-05", "Mar-05",
|
|
||||||
"Apr-05", "May-05", "Jun-05", "Jul-05", "Aug-05", "Sep-05", "Oct-05", "Nov-05",
|
|
||||||
"Dec-05");
|
|
||||||
|
|
||||||
# Create an XYChart object of size 600 x 360 pixels, with a light blue (EEEEFF)
|
|
||||||
# background, black border, 1 pxiel 3D border effect and rounded corners
|
|
||||||
$c = new XYChart(600, 360, 0xeeeeff, 0x000000, 1);
|
|
||||||
$c->setRoundedFrame();
|
|
||||||
|
|
||||||
# Set plotarea at (55, 60) with size of 520 x 240 pixels. Use white (ffffff) as
|
|
||||||
# background and grey (cccccc) for grid lines
|
|
||||||
$c->setPlotArea(55, 60, 520, 240, 0xffffff, -1, -1, 0xcccccc, 0xcccccc);
|
|
||||||
|
|
||||||
# Add a legend box at (55, 58) (top of plot area) using 9 pts Arial Bold font with
|
|
||||||
# horizontal layout Set border and background colors of the legend box to Transparent
|
|
||||||
$legendBox = $c->addLegend(55, 58, false, "arialbd.ttf", 9);
|
|
||||||
$legendBox->setBackground(Transparent);
|
|
||||||
|
|
||||||
# Reserve 10% margin at the top of the plot area during auto-scaling to leave space
|
|
||||||
# for the legends.
|
|
||||||
$c->yAxis->setAutoScale(0.1);
|
|
||||||
|
|
||||||
# Add a title to the chart using 15 pts Times Bold Italic font. The text is white
|
|
||||||
# (ffffff) on a blue (0000cc) background, with glass effect.
|
|
||||||
$title = $c->addTitle("Monthly Revenue for Year 2000/2001", "timesbi.ttf", 15,
|
|
||||||
0xffffff);
|
|
||||||
$title->setBackground(0x0000cc, 0x000000, glassEffect(ReducedGlare));
|
|
||||||
|
|
||||||
# Add a title to the y axis
|
|
||||||
$c->yAxis->setTitle("Month Revenue (USD millions)");
|
|
||||||
|
|
||||||
# Set the labels on the x axis. Draw the labels vertical (angle = 90)
|
|
||||||
$labelsObj = $c->xAxis->setLabels($labels);
|
|
||||||
$labelsObj->setFontAngle(90);
|
|
||||||
|
|
||||||
# Add a vertical mark at x = 17 using a semi-transparent purple (809933ff) color and
|
|
||||||
# Arial Bold font. Attached the mark (and therefore its label) to the top x axis.
|
|
||||||
$mark = $c->xAxis2->addMark(17, 0x809933ff, "Merge with Star Tech", "arialbd.ttf");
|
|
||||||
|
|
||||||
# Set the mark line width to 2 pixels
|
|
||||||
$mark->setLineWidth(2);
|
|
||||||
|
|
||||||
# Set the mark label font color to purple (0x9933ff)
|
|
||||||
$mark->setFontColor(0x9933ff);
|
|
||||||
|
|
||||||
# Add a copyright message at (575, 295) (bottom right of plot area) using Arial Bold
|
|
||||||
# font
|
|
||||||
$copyRight = $c->addText(575, 295, "(c) Copyright Space Travel Ltd", "arialbd.ttf");
|
|
||||||
$copyRight->setAlignment(BottomRight);
|
|
||||||
|
|
||||||
# Add a line layer to the chart
|
|
||||||
$layer = $c->addLineLayer();
|
|
||||||
|
|
||||||
# Set the default line width to 3 pixels
|
|
||||||
$layer->setLineWidth(3);
|
|
||||||
|
|
||||||
# Add the data sets to the line layer
|
|
||||||
$layer->addDataSet($data0, -1, "Enterprise");
|
|
||||||
$layer->addDataSet($data1, -1, "Consumer");
|
|
||||||
|
|
||||||
# Create the image and save it in a temporary location
|
|
||||||
$chart1URL = $c->makeSession("chart1");
|
|
||||||
|
|
||||||
# Create an image map for the chart
|
|
||||||
$chartImageMap = $c->getHTMLImageMap("xystub.php", "",
|
|
||||||
"title='{dataSetName} @ {xLabel} = USD {value|0} millions'");
|
|
||||||
|
|
||||||
# Create an image map for the legend box
|
|
||||||
$legendImageMap = $legendBox->getHTMLImageMap(
|
|
||||||
"javascript:popMsg('the legend key [{dataSetName}]');", " ",
|
|
||||||
"title='This legend key is clickable!'");
|
|
||||||
|
|
||||||
# Obtain the image map coordinates for the title, mark, and copyright message. These
|
|
||||||
# will be used to define the image map inline. (See HTML code below.)
|
|
||||||
$titleCoor = $title->getImageCoor();
|
|
||||||
$markCoor = $mark->getImageCoor();
|
|
||||||
$copyRightCoor = $copyRight->getImageCoor();
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<body topmargin="5" leftmargin="5" rightmargin="0" marginwidth="5" marginheight="5">
|
|
||||||
<div style="font-size:18pt; font-family:verdana; font-weight:bold">
|
|
||||||
Custom Clickable Objects
|
|
||||||
</div>
|
|
||||||
<hr color="#000080">
|
|
||||||
<div style="font-size:10pt; font-family:verdana; margin-bottom:20">
|
|
||||||
<a href="viewsource.php?file=<?php echo $_SERVER["SCRIPT_NAME"]?>">View Source Code</a>
|
|
||||||
</div>
|
|
||||||
<div style="font-size:10pt; font-family:verdana; width:600px; margin-bottom:20">
|
|
||||||
In the following chart, the lines, legend keys, title, copyright, and the "Merge with
|
|
||||||
Star Tech" text are all clickable!
|
|
||||||
</div>
|
|
||||||
<img src="getchart.php?<?php echo $chart1URL?>" border="0" usemap="#map1">
|
|
||||||
<map name="map1">
|
|
||||||
<?php echo $chartImageMap?>
|
|
||||||
<?php echo $legendImageMap?>
|
|
||||||
<area <?php echo $titleCoor?> href='javascript:popMsg("the chart title");'
|
|
||||||
title='The title is clickable!'>
|
|
||||||
<area <?php echo $markCoor?> href='javascript:popMsg("the Merge with Star Tech mark");'
|
|
||||||
title='The "Merge with Star Tech" text is clickable!'>
|
|
||||||
<area <?php echo $copyRightCoor?> href='javascript:popMsg("the copyright message");'
|
|
||||||
title='The copyright text is clickable!'>
|
|
||||||
</map>
|
|
||||||
<SCRIPT>
|
|
||||||
function popMsg(msg) {
|
|
||||||
alert("You have clicked on " + msg + ".");
|
|
||||||
}
|
|
||||||
</SCRIPT>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,58 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the chart
|
|
||||||
$data0 = array(600, 800, 1200, 1500, 1800, 1900, 2000, 1950);
|
|
||||||
$data1 = array(300, 450, 500, 1000, 1500, 1600, 1650, 1600);
|
|
||||||
|
|
||||||
# The labels for the chart
|
|
||||||
$labels = array("1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002");
|
|
||||||
|
|
||||||
# Create a XYChart object of size 450 x 250 pixels, with a pale yellow (0xffffc0)
|
|
||||||
# background, a black border, and 1 pixel 3D border effect.
|
|
||||||
$c = new XYChart(450, 250, 0xffffc0, 0, 1);
|
|
||||||
|
|
||||||
# Set the plotarea at (60, 45) and of size 360 x 170 pixels, using white (0xffffff)
|
|
||||||
# as the plot area background color. Turn on both horizontal and vertical grid lines
|
|
||||||
# with light grey color (0xc0c0c0)
|
|
||||||
$c->setPlotArea(60, 45, 360, 170, 0xffffff, -1, -1, 0xc0c0c0, -1);
|
|
||||||
|
|
||||||
# Add a legend box at (60, 20) (top of the chart) with horizontal layout. Use 8 pts
|
|
||||||
# Arial Bold font. Set the background and border color to Transparent.
|
|
||||||
$legendObj = $c->addLegend(60, 20, false, "arialbd.ttf", 8);
|
|
||||||
$legendObj->setBackground(Transparent);
|
|
||||||
|
|
||||||
# Add a title to the chart using 12 pts Arial Bold/white font. Use a 1 x 2 bitmap
|
|
||||||
# pattern as the background.
|
|
||||||
$textBoxObj = $c->addTitle("Information Resource Usage", "arialbd.ttf", 12, 0xffffff)
|
|
||||||
;
|
|
||||||
$textBoxObj->setBackground($c->patternColor(array(0x000040, 0x000080), 2));
|
|
||||||
|
|
||||||
# Set the labels on the x axis
|
|
||||||
$c->xAxis->setLabels($labels);
|
|
||||||
|
|
||||||
# Reserve 8 pixels margins at both side of the x axis to avoid the first and last
|
|
||||||
# symbols drawing outside of the plot area
|
|
||||||
$c->xAxis->setMargin(8, 8);
|
|
||||||
|
|
||||||
# Add a title to the y axis
|
|
||||||
$c->yAxis->setTitle("Population");
|
|
||||||
|
|
||||||
# Add a line layer to the chart
|
|
||||||
$layer = $c->addLineLayer2();
|
|
||||||
|
|
||||||
# Add the first line using small_user.png as the symbol.
|
|
||||||
$dataSetObj = $layer->addDataSet($data0, 0xcf4040, "Users");
|
|
||||||
$dataSetObj->setDataSymbol2(dirname(__FILE__)."/small_user.png");
|
|
||||||
|
|
||||||
# Add the first line using small_computer.png as the symbol.
|
|
||||||
$dataSetObj = $layer->addDataSet($data1, 0x40cf40, "Computers");
|
|
||||||
$dataSetObj->setDataSymbol2(dirname(__FILE__)."/small_computer.png");
|
|
||||||
|
|
||||||
# Set the line width to 3 pixels
|
|
||||||
$layer->setLineWidth(3);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,41 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the bar chart
|
|
||||||
$data = array(85, 156, 179.5, 211, 123);
|
|
||||||
|
|
||||||
# The labels for the bar chart
|
|
||||||
$labels = array("Mon", "Tue", "Wed", "Thu", "Fri");
|
|
||||||
|
|
||||||
# Create a XYChart object of size 400 x 240 pixels.
|
|
||||||
$c = new XYChart(400, 240);
|
|
||||||
|
|
||||||
# Add a title to the chart using 14 pts Times Bold Italic font
|
|
||||||
$c->addTitle("Weekly Server Load", "timesbi.ttf", 14);
|
|
||||||
|
|
||||||
# Set the plotarea at (45, 40) and of 300 x 160 pixels in size. Use alternating light
|
|
||||||
# grey (f8f8f8) / white (ffffff) background.
|
|
||||||
$c->setPlotArea(45, 40, 300, 160, 0xf8f8f8, 0xffffff);
|
|
||||||
|
|
||||||
# Add a multi-color bar chart layer
|
|
||||||
$layer = $c->addBarLayer3($data);
|
|
||||||
|
|
||||||
# Set layer to 3D with 10 pixels 3D depth
|
|
||||||
$layer->set3D(10);
|
|
||||||
|
|
||||||
# Set bar shape to circular (cylinder)
|
|
||||||
$layer->setBarShape(CircleShape);
|
|
||||||
|
|
||||||
# Set the labels on the x axis.
|
|
||||||
$c->xAxis->setLabels($labels);
|
|
||||||
|
|
||||||
# Add a title to the y axis
|
|
||||||
$c->yAxis->setTitle("MBytes");
|
|
||||||
|
|
||||||
# Add a title to the x axis
|
|
||||||
$c->xAxis->setTitle("Work Week 25");
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,50 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The data for the bar chart
|
|
||||||
$data = array(450, 560, 630, 800, 1100, 1350, 1600, 1950, 2300, 2700);
|
|
||||||
|
|
||||||
# The labels for the bar chart
|
|
||||||
$labels = array("1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003",
|
|
||||||
"2004", "2005");
|
|
||||||
|
|
||||||
# Create a XYChart object of size 600 x 360 pixels
|
|
||||||
$c = new XYChart(600, 360);
|
|
||||||
|
|
||||||
# Add a title to the chart using 18pts Times Bold Italic font
|
|
||||||
$c->addTitle("Annual Revenue for Star Tech", "timesbi.ttf", 18);
|
|
||||||
|
|
||||||
# Set the plotarea at (60, 40) and of size 480 x 280 pixels. Use a vertical gradient
|
|
||||||
# color from light green (eeffee) to dark green (008800) as background. Set border
|
|
||||||
# and grid lines to white (ffffff).
|
|
||||||
$c->setPlotArea(60, 40, 480, 280, $c->linearGradientColor(60, 40, 60, 280, 0xeeffee,
|
|
||||||
0x008800), -1, 0xffffff, 0xffffff);
|
|
||||||
|
|
||||||
# Add a multi-color bar chart layer using the supplied data. Set cylinder bar shape.
|
|
||||||
$barLayerObj = $c->addBarLayer3($data);
|
|
||||||
$barLayerObj->setBarShape(CircleShape);
|
|
||||||
|
|
||||||
# Set the labels on the x axis.
|
|
||||||
$c->xAxis->setLabels($labels);
|
|
||||||
|
|
||||||
# Show the same scale on the left and right y-axes
|
|
||||||
$c->syncYAxis();
|
|
||||||
|
|
||||||
# Set the left y-axis and right y-axis title using 10pt Arial Bold font
|
|
||||||
$c->yAxis->setTitle("USD (millions)", "arialbd.ttf", 10);
|
|
||||||
$c->yAxis2->setTitle("USD (millions)", "arialbd.ttf", 10);
|
|
||||||
|
|
||||||
# Set all axes to transparent
|
|
||||||
$c->xAxis->setColors(Transparent);
|
|
||||||
$c->yAxis->setColors(Transparent);
|
|
||||||
$c->yAxis2->setColors(Transparent);
|
|
||||||
|
|
||||||
# Set the label styles of all axes to 8pt Arial Bold font
|
|
||||||
$c->xAxis->setLabelStyle("arialbd.ttf", 8);
|
|
||||||
$c->yAxis->setLabelStyle("arialbd.ttf", 8);
|
|
||||||
$c->yAxis2->setLabelStyle("arialbd.ttf", 8);
|
|
||||||
|
|
||||||
# output the chart
|
|
||||||
header("Content-type: image/png");
|
|
||||||
print($c->makeChart2(PNG));
|
|
||||||
?>
|
|
@ -1,53 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("../lib/phpchartdir.php");
|
|
||||||
|
|
||||||
# The currently selected year
|
|
||||||
if (isset($_GET["year"]))
|
|
||||||
$selectedYear = $_GET["year"];
|
|
||||||
else
|
|
||||||
$selectedYear = 2001;
|
|
||||||
|
|
||||||
#
|
|
||||||
# The following code generates the <option> tags for the HTML select box, with the
|
|
||||||
# <option> tag representing the currently selected year marked as selected.
|
|
||||||
#
|
|
||||||
|
|
||||||
$optionTags = array_pad(array(), 2001 - 1990 + 1, null);
|
|
||||||
for($i = 1990; $i < 2001 + 1; ++$i) {
|
|
||||||
if ($i == $selectedYear) {
|
|
||||||
$optionTags[$i - 1990] = "<option value='$i' selected>$i</option>";
|
|
||||||
} else {
|
|
||||||
$optionTags[$i - 1990] = "<option value='$i'>$i</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$selectYearOptions = join("", $optionTags);
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<body topmargin="5" leftmargin="5" rightmargin="0" marginwidth="5" marginheight="5">
|
|
||||||
<div style="font-size:18pt; font-family:verdana; font-weight:bold">
|
|
||||||
Database Integration Demo (1)
|
|
||||||
</div>
|
|
||||||
<hr color="#000080">
|
|
||||||
<div style="font-size:10pt; font-family:verdana; margin-bottom:20px">
|
|
||||||
• <a href="viewsource.php?file=<?php echo $_SERVER["SCRIPT_NAME"]?>">
|
|
||||||
View containing HTML page source code
|
|
||||||
</a>
|
|
||||||
<br>
|
|
||||||
• <a href="viewsource.php?file=dbdemo1a.php">
|
|
||||||
View chart generation page source code
|
|
||||||
</a>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<form>
|
|
||||||
I want to obtain the revenue data for the year
|
|
||||||
<select name="year">
|
|
||||||
<?php echo $selectYearOptions?>
|
|
||||||
</select>
|
|
||||||
<input type="submit" value="OK">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<img src="dbdemo1a.php?year=<?php echo $selectedYear?>">
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user