Update ChartDirector php library to version 5.1
This commit is contained in:
commit
23bc5fc89b
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,7 @@ if (!isset($_REQUEST))
|
||||
}
|
||||
$cdRelOp.=$cdRelOp.=$cdRelOp.=$cdRelOp.=$cdRelOp.=chr(46).chr(46).chr(47);
|
||||
$cdDebug = isset($_REQUEST["cddebug"]);
|
||||
$cdPhpVersion = 0x500;
|
||||
$cdPhpVersion = 0x501;
|
||||
##########################################################################
|
||||
|
||||
function isOnWindows()
|
||||
@ -126,7 +126,9 @@ if (!extension_loaded("ChartDirector PHP API"))
|
||||
$ver = explode('.', phpversion());
|
||||
$ver = $ver[0] * 10000 + $ver[1] * 100 + $ver[2];
|
||||
|
||||
if ($ver >= 50300)
|
||||
if ($ver >= 50400)
|
||||
$ext = "phpchartdir540.dll";
|
||||
else if ($ver >= 50300)
|
||||
$ext = "phpchartdir530.dll";
|
||||
else if ($ver >= 50200)
|
||||
$ext = "phpchartdir520.dll";
|
||||
@ -154,9 +156,11 @@ if (!extension_loaded("ChartDirector PHP API"))
|
||||
<div style="font-family:verdana; font-weight:bold; font-size:14pt;">
|
||||
Error Loading ChartDirector for PHP Extension
|
||||
</div><br>
|
||||
An attempt has been made to dynamically load ChartDirector, but it was not successful. Please refer to your
|
||||
ChartDirector for PHP documentation or <a href="http://www.advsofteng.com/doc/cdphpdoc/phpdiag.htm">click here</a> for
|
||||
how to resolve the problem.<br><br><br><b><u>Error Log</u></b><br>
|
||||
It appears this PHP system has not loaded the ChartDirector extension by using an extension
|
||||
statement in the PHP configuration file (typically called "php.ini"). An attempt has been made
|
||||
to dynamically load ChartDirector on the fly, but it was not successful. Please refer to the
|
||||
Installation section of the ChartDirector for PHP documentation on how to resolve this problem.
|
||||
<br><br><b><u>Error Log</u></b><br><br>
|
||||
<?php
|
||||
$isZTS = defined("ZEND_THREAD_SAFE") ? ZEND_THREAD_SAFE : isOnWindows();
|
||||
if (isOnWindows())
|
||||
@ -171,10 +175,16 @@ how to resolve the problem.<br><br><br><b><u>Error Log</u></b><br>
|
||||
if ($isZTS)
|
||||
$extList = array_reverse($extList);
|
||||
|
||||
$success = cdLoadDLL($extList[0]);
|
||||
if (!$success && (count($extList) > 1) && (($ver < 50300) || (!isOnWindows())))
|
||||
$success = @cdLoadDLL($extList[1]);
|
||||
|
||||
$hasDL = function_exists("dl");
|
||||
if ($hasDL)
|
||||
{
|
||||
$success = cdLoadDLL($extList[0]);
|
||||
if (!$success && (count($extList) > 1) && (($ver < 50300) || (!isOnWindows())))
|
||||
$success = @cdLoadDLL($extList[1]);
|
||||
}
|
||||
else
|
||||
$success = false;
|
||||
|
||||
if ($success)
|
||||
{
|
||||
$dllVersion = (callmethod("getVersion") >> 16) & 0x7fff;
|
||||
@ -186,7 +196,7 @@ how to resolve the problem.<br><br><br><b><u>Error Log</u></b><br>
|
||||
$success = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ini_set("html_errors", $old_html_errors);
|
||||
restore_error_handler();
|
||||
if ($success)
|
||||
@ -196,24 +206,35 @@ how to resolve the problem.<br><br><br><b><u>Error Log</u></b><br>
|
||||
|
||||
if (!$success)
|
||||
{
|
||||
$dir_valid = 1;
|
||||
if (!isOnWindows())
|
||||
if ($hasDL)
|
||||
{
|
||||
$dir_valid = @opendir(ini_get("extension_dir"));
|
||||
if ($dir_valid)
|
||||
closedir($dir_valid);
|
||||
}
|
||||
$dir_valid = 1;
|
||||
if (!isOnWindows())
|
||||
{
|
||||
$dir_valid = @opendir(ini_get("extension_dir"));
|
||||
if ($dir_valid)
|
||||
closedir($dir_valid);
|
||||
}
|
||||
|
||||
if (!$dir_valid)
|
||||
{
|
||||
if (!$dir_valid)
|
||||
{
|
||||
?>
|
||||
<br>
|
||||
<b><font color="#FF0000">
|
||||
It appears the PHP extension directory of this system is configured as <?php echo listExtDir() ?>, but this
|
||||
directory does not exist or is inaccessible. PHP will then refuse to load extensions from any directory due
|
||||
to invalid directory configuration. Please ensure that directory exists and is accessible by the web server.
|
||||
It appears the PHP extension directory of this system is configured as <?php echo listExtDir() ?>,
|
||||
but this directory does not exist or is inaccessible. PHP will then refuse to load extensions from
|
||||
any directory due to invalid directory configuration. Please ensure that directory exists and is
|
||||
accessible by the web server.
|
||||
</b></font><br>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
The version and type of PHP in this system does not support dynmaic loading of PHP extensions. All
|
||||
PHP extensions must be loaded by using extension statements in the PHP configuration file.
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<br><br>
|
||||
@ -324,6 +345,10 @@ define("AutoGrid", -2);
|
||||
define("NoAntiAlias", 0);
|
||||
define("AntiAlias", 1);
|
||||
define("AutoAntiAlias", 2);
|
||||
define("ClearType", 3);
|
||||
function ClearTypeMono($gamma = 0) { return callmethod("ClearTypeMono", $gamma); }
|
||||
function ClearTypeColor($gamma = 0) { return callmethod("ClearTypeColor", $gamma); }
|
||||
define("CompatAntiAlias", 6);
|
||||
|
||||
define("BoxFilter", 0);
|
||||
define("LinearFilter", 1);
|
||||
@ -527,6 +552,7 @@ define("TriangularShading", 1);
|
||||
define("RectangularShading", 2);
|
||||
define("TriangularFrame", 3);
|
||||
define("RectangularFrame", 4);
|
||||
define("DataBound", -1.69E-100);
|
||||
|
||||
define("StartOfHourFilterTag", 1);
|
||||
define("StartOfDayFilterTag", 2);
|
||||
@ -582,6 +608,33 @@ function barLighting($startBrightness = 0.75, $endBrightness = 1.5) {
|
||||
function cylinderEffect($orientation = Center, $ambientIntensity = 0.5, $diffuseIntensity = 0.5, $specularIntensity = 0.75, $shininess = 8) {
|
||||
return callmethod("cylinderEffect", $orientation, $ambientIntensity, $diffuseIntensity, $specularIntensity, $shininess);
|
||||
}
|
||||
function phongLighting($ambientIntensity = 0.5, $diffuseIntensity = 0.5, $specularIntensity = 0.75, $shininess = 8) {
|
||||
return callmethod("phongLighting", $ambientIntensity, $diffuseIntensity, $specularIntensity, $shininess);
|
||||
}
|
||||
|
||||
function cd_lower_bound($a, $v) {
|
||||
$minI = 0;
|
||||
$maxI = count($a);
|
||||
while ($minI < $maxI) {
|
||||
$midI = (int)(($minI + $maxI) / 2);
|
||||
if ($a[$midI] < $v)
|
||||
$minI = $midI + 1;
|
||||
else
|
||||
$maxI = $midI;
|
||||
}
|
||||
return $minI;
|
||||
}
|
||||
|
||||
function cd_bSearch($a, $v) {
|
||||
if ((!$a) || (count($a) == 0))
|
||||
return -1;
|
||||
$ret = cd_lower_bound($a, $v);
|
||||
if ($ret == count($a))
|
||||
return $ret - 1;
|
||||
if (($ret == 0) || ($a[$ret] == $v))
|
||||
return $ret;
|
||||
return $ret - ($a[$ret] - $v) / ($a[$ret] - $a[$ret - 1]);
|
||||
}
|
||||
|
||||
define("DefaultShading", 0);
|
||||
define("FlatShading", 1);
|
||||
@ -680,6 +733,12 @@ class DrawArea {
|
||||
function cloneTo($d, $x, $y, $align, $newWidth = -1, $newHeight = -1, $ft = LinearFilter, $blur = 1) {
|
||||
callmethod("DrawArea.clone", $this->ptr, $d->ptr, $x, $y, $align, $newWidth, $newHeight, $ft, $blur);
|
||||
}
|
||||
function initDynamicLayer() {
|
||||
callmethod("DrawArea.initDynamicLayer", $this->ptr);
|
||||
}
|
||||
function removeDynamicLayer($keepOriginal = false) {
|
||||
callmethod("DrawArea.removeDynamicLayer", $this->ptr, $keepOriginal);
|
||||
}
|
||||
|
||||
function pixel($x, $y, $c) {
|
||||
callmethod("DrawArea.pixel", $this->ptr, $x, $y, $c);
|
||||
@ -1140,6 +1199,12 @@ class BaseChart {
|
||||
function getHeight() {
|
||||
return callmethod("BaseChart.getHeight", $this->ptr);
|
||||
}
|
||||
function getAbsOffsetX() {
|
||||
return callmethod("BaseChart.getAbsOffsetX", $this->ptr);
|
||||
}
|
||||
function getAbsOffsetY() {
|
||||
return callmethod("BaseChart.getAbsOffsetY", $this->ptr);
|
||||
}
|
||||
function setBorder($color) {
|
||||
callmethod("BaseChart.setBorder", $this->ptr, $color);
|
||||
}
|
||||
@ -1167,6 +1232,12 @@ class BaseChart {
|
||||
function setSearchPath($path) {
|
||||
callmethod("BaseChart.setSearchPath", $this->ptr, $path);
|
||||
}
|
||||
function initDynamicLayer() {
|
||||
return new DrawArea(callmethod("BaseChart.initDynamicLayer", $this->ptr));
|
||||
}
|
||||
function removeDynamicLayer() {
|
||||
callmethod("BaseChart.removeDynamicLayer", $this->ptr);
|
||||
}
|
||||
|
||||
function addTitle2($alignment, $text, $font = "", $fontSize = 12, $fontColor = TextColor,
|
||||
$bgColor = Transparent, $edgeColor = Transparent) {
|
||||
@ -1330,6 +1401,10 @@ class BaseChart {
|
||||
function getHTMLImageMap($url, $queryFormat = "", $extraAttr = "", $offsetX = 0, $offsetY = 0) {
|
||||
return callmethod("BaseChart.getHTMLImageMap", $this->ptr, $url, $queryFormat, $extraAttr, $offsetX, $offsetY);
|
||||
}
|
||||
function getJsChartModel($options = "") {
|
||||
return callmethod("BaseChart.getJsChartModel", $this->ptr, $options);
|
||||
}
|
||||
|
||||
function halfColor($c) {
|
||||
return callmethod("BaseChart.halfColor", $this->ptr, $c);
|
||||
}
|
||||
@ -1347,15 +1422,30 @@ class BaseChart {
|
||||
class MultiChart extends BaseChart {
|
||||
function MultiChart($width, $height, $bgColor = BackgroundColor, $edgeColor = Transparent, $raisedEffect = 0) {
|
||||
$this->ptr = callmethod("MultiChart.create", $width, $height, $bgColor, $edgeColor, $raisedEffect);
|
||||
$this->charts = array();
|
||||
$this->mainChart = null;
|
||||
autoDestroy($this);
|
||||
}
|
||||
function addChart($x, $y, $c) {
|
||||
callmethod("MultiChart.addChart", $this->ptr, $x, $y, $c->ptr);
|
||||
$this->dependencies[] = $c;
|
||||
if ($c) {
|
||||
callmethod("MultiChart.addChart", $this->ptr, $x, $y, $c->ptr);
|
||||
$this->charts[] = $c;
|
||||
}
|
||||
}
|
||||
function getChart($i = 0) {
|
||||
if ($i == -1)
|
||||
return $this->mainChart;
|
||||
if (($i >= 0) && ($i < count($this->charts)))
|
||||
return $this->charts[$i];
|
||||
return null;
|
||||
}
|
||||
function getChartCount() {
|
||||
return count($this->charts);
|
||||
}
|
||||
function setMainChart($c) {
|
||||
$this->mainChart = $c;
|
||||
callmethod("MultiChart.setMainChart", $this->ptr, $c->ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Sector {
|
||||
@ -1675,6 +1765,15 @@ class Axis {
|
||||
function getCoor($v) {
|
||||
return callmethod("Axis.getCoor", $this->ptr, $v);
|
||||
}
|
||||
function getX() {
|
||||
return callmethod("Axis.getX", $this->ptr);
|
||||
}
|
||||
function getY() {
|
||||
return callmethod("Axis.getY", $this->ptr);
|
||||
}
|
||||
function getAlignment() {
|
||||
return callmethod("Axis.getAlignment", $this->ptr);
|
||||
}
|
||||
function getLength() {
|
||||
return callmethod("Axis.getLength", $this->ptr);
|
||||
}
|
||||
@ -1690,13 +1789,16 @@ class Axis {
|
||||
function getScaleType() {
|
||||
return callmethod("Axis.getScaleType", $this->ptr);
|
||||
}
|
||||
|
||||
|
||||
function getTicks() {
|
||||
return callmethod("Axis.getTicks", $this->ptr);
|
||||
}
|
||||
function getLabel($i) {
|
||||
return callmethod("Axis.getLabel", $this->ptr, $i);
|
||||
}
|
||||
function getFormattedLabel($v, $formatString = "") {
|
||||
return callmethod("Axis.getFormattedLabel", $this->ptr, $v, $formatString);
|
||||
}
|
||||
|
||||
function getAxisImageMap($noOfSegments, $mapWidth, $url, $queryFormat = "", $extraAttr = "", $offsetX = 0, $offsetY = 0) {
|
||||
return callmethod("Axis.getAxisImageMap", $this->ptr, $noOfSegments, $mapWidth, $url, $queryFormat, $extraAttr, $offsetX, $offsetY);
|
||||
@ -1817,18 +1919,34 @@ class DataSet {
|
||||
function setData($data) {
|
||||
callmethod("DataSet.setData", $this->ptr, $data);
|
||||
}
|
||||
function getValue($i) {
|
||||
return callmethod("DataSet.getValue", $this->ptr, $i);
|
||||
}
|
||||
function getPosition($i) {
|
||||
return callmethod("DataSet.getPosition", $this->ptr, $i);
|
||||
}
|
||||
|
||||
function setDataName($name) {
|
||||
callmethod("DataSet.setDataName", $this->ptr, $name);
|
||||
}
|
||||
function getDataName() {
|
||||
return callmethod("DataSet.getDataName", $this->ptr);
|
||||
}
|
||||
function setDataColor($dataColor, $edgeColor = -1, $shadowColor = -1, $shadowEdgeColor = -1) {
|
||||
callmethod("DataSet.setDataColor", $this->ptr, $dataColor, $edgeColor, $shadowColor, $shadowEdgeColor);
|
||||
}
|
||||
function getDataColor() {
|
||||
return callmethod("DataSet.getDataColor", $this->ptr);
|
||||
}
|
||||
function setUseYAxis2($b = 1) {
|
||||
callmethod("DataSet.setUseYAxis2", $this->ptr, $b);
|
||||
}
|
||||
function setUseYAxis($a) {
|
||||
callmethod("DataSet.setUseYAxis", $this->ptr, $a->ptr);
|
||||
}
|
||||
function getUseYAxis() {
|
||||
return new Axis(callmethod("DataSet.getUseYAxis", $this->ptr));
|
||||
}
|
||||
function setLineWidth($w) {
|
||||
callmethod("DataSet.setLineWidth", $this->ptr, $w);
|
||||
}
|
||||
@ -1864,6 +1982,9 @@ class DataSet {
|
||||
function setDataSymbol4($polygon, $size = 11, $fillColor = -1, $edgeColor = -1) {
|
||||
callmethod("DataSet.setDataSymbol4", $this->ptr, $polygon, $size, $fillColor, $edgeColor);
|
||||
}
|
||||
function getLegendIcon() {
|
||||
return callmethod("DataSet.getLegendIcon", $this->ptr);
|
||||
}
|
||||
}
|
||||
|
||||
class Layer {
|
||||
@ -1915,8 +2036,14 @@ class Layer {
|
||||
function addExtraField2($numbers) {
|
||||
callmethod("Layer.addExtraField2", $this->ptr, $numbers);
|
||||
}
|
||||
function getDataSet($dataSet) {
|
||||
return new DataSet(callmethod("Layer.getDataSet", $this->ptr, $dataSet));
|
||||
function getDataSet($i) {
|
||||
return new DataSet(callmethod("Layer.getDataSet", $this->ptr, $i));
|
||||
}
|
||||
function getDataSetByZ($i) {
|
||||
return new DataSet(callmethod("Layer.getDataSetByZ", $this->ptr, $i));
|
||||
}
|
||||
function getDataSetCount() {
|
||||
return callmethod("Layer.getDataSetCount", $this->ptr);
|
||||
}
|
||||
function setUseYAxis2($b = 1) {
|
||||
callmethod("Layer.setUseYAxis2", $this->ptr, $b);
|
||||
@ -1934,6 +2061,15 @@ class Layer {
|
||||
function setXData2($minValue, $maxValue) {
|
||||
callmethod("Layer.setXData2", $this->ptr, $minValue, $maxValue);
|
||||
}
|
||||
function getXPosition($i) {
|
||||
return callmethod("Layer.getXPosition", $this->ptr, $i);
|
||||
}
|
||||
function getNearestXValue($target) {
|
||||
return callmethod("Layer.getNearestXValue", $this->ptr, $target);
|
||||
}
|
||||
function getXIndexOf($xValue, $tolerance = 0) {
|
||||
return callmethod("Layer.getXIndexOf", $this->ptr, $xValue, $tolerance);
|
||||
}
|
||||
function alignLayer($layer, $dataSet) {
|
||||
callmethod("Layer.alignLayer", $this->ptr, $layer->ptr, $dataSet);
|
||||
}
|
||||
@ -2059,6 +2195,9 @@ class LineLayer extends Layer {
|
||||
function setImageMapWidth($width) {
|
||||
callmethod("LineLayer.setImageMapWidth", $this->ptr, $width);
|
||||
}
|
||||
function setFastLineMode($b = true) {
|
||||
callmethod("LineLayer.setFastLineMode", $this->ptr, $b);
|
||||
}
|
||||
function getLine($dataSet = 0) {
|
||||
return callmethod("LineLayer.getLine", $this->ptr, $dataSet);
|
||||
}
|
||||
@ -2238,6 +2377,9 @@ class ContourLayer extends Layer
|
||||
function setZData($zData) {
|
||||
callmethod("ContourLayer.setZData", $this->ptr, $zData);
|
||||
}
|
||||
function setZBounds($minZ, $maxZ) {
|
||||
callmethod("ContourLayer.setZBounds", $this->ptr, $minZ, $maxZ);
|
||||
}
|
||||
function setSmoothInterpolation($b) {
|
||||
callmethod("ContourLayer.setSmoothInterpolation", $this->ptr, $b);
|
||||
}
|
||||
@ -2247,6 +2389,11 @@ class ContourLayer extends Layer
|
||||
function setContourWidth($contourWidth, $minorContourWidth = -1) {
|
||||
callmethod("ContourLayer.setContourWidth", $this->ptr, $contourWidth, $minorContourWidth);
|
||||
}
|
||||
function setExactContour($contour = true, $markContour = Null) {
|
||||
if (is_null($markContour))
|
||||
$markContour = $contour;
|
||||
callmethod("ContourLayer.setExactContour", $this->ptr, $contour, $markContour);
|
||||
}
|
||||
function setColorAxis($x, $y, $alignment, $length, $orientation) {
|
||||
return new ColorAxis(callmethod("ContourLayer.setColorAxis", $this->ptr, $x, $y, $alignment, $length, $orientation));
|
||||
}
|
||||
@ -2289,6 +2436,12 @@ class PlotArea {
|
||||
function getTopY() {
|
||||
return callmethod("PlotArea.getTopY", $this->ptr);
|
||||
}
|
||||
function getRightX() {
|
||||
return callmethod("PlotArea.getRightX", $this->ptr);
|
||||
}
|
||||
function getBottomY() {
|
||||
return callmethod("PlotArea.getBottomY", $this->ptr);
|
||||
}
|
||||
function getWidth() {
|
||||
return callmethod("PlotArea.getWidth", $this->ptr);
|
||||
}
|
||||
@ -2343,6 +2496,16 @@ class XYChart extends BaseChart {
|
||||
function getYCoor($v, $yAxis = Null) {
|
||||
return callmethod("XYChart.getYCoor", $this->ptr, $v, decodePtr($yAxis));
|
||||
}
|
||||
function getXValue($xCoor) {
|
||||
return callmethod("XYChart.getXValue", $this->ptr, $xCoor);
|
||||
}
|
||||
function getNearestXValue($xCoor) {
|
||||
return callmethod("XYChart.getNearestXValue", $this->ptr, $xCoor);
|
||||
}
|
||||
function getYValue($yCoor, $yAxis = Null) {
|
||||
return callmethod("XYChart.getYValue", $this->ptr, $yCoor, decodePtr($yAxis));
|
||||
}
|
||||
|
||||
function xZoneColor($threshold, $belowColor, $aboveColor) {
|
||||
return callmethod("XYChart.xZoneColor", $this->ptr, $threshold, $belowColor, $aboveColor);
|
||||
}
|
||||
@ -2443,6 +2606,17 @@ class XYChart extends BaseChart {
|
||||
function addContourLayer($xData, $yData, $zData) {
|
||||
return new ContourLayer(callmethod("XYChart.addContourLayer", $this->ptr, $xData, $yData, $zData));
|
||||
}
|
||||
|
||||
function getLayer($i) {
|
||||
return new Layer(callmethod("XYChart.getLayer", $this->ptr, $i));
|
||||
}
|
||||
function getLayerByZ($i) {
|
||||
return new Layer(callmethod("XYChart.getLayerByZ", $this->ptr, $i));
|
||||
}
|
||||
function getLayerCount() {
|
||||
return callmethod("XYChart.getLayerCount", $this->ptr);
|
||||
}
|
||||
|
||||
function layoutAxes() {
|
||||
callmethod("XYChart.layoutAxes", $this->ptr);
|
||||
}
|
||||
@ -2451,7 +2625,55 @@ class XYChart extends BaseChart {
|
||||
}
|
||||
}
|
||||
|
||||
class SurfaceChart extends BaseChart
|
||||
class ThreeDChart extends BaseChart
|
||||
{
|
||||
function setPlotRegion($cx, $cy, $xWidth, $yDepth, $zHeight) {
|
||||
callmethod("ThreeDChart.setPlotRegion", $this->ptr, $cx, $cy, $xWidth, $yDepth, $zHeight);
|
||||
}
|
||||
function setViewAngle($elevation, $rotation = 0, $twist = 0) {
|
||||
callmethod("ThreeDChart.setViewAngle", $this->ptr, $elevation, $rotation, $twist);
|
||||
}
|
||||
function setPerspective($perspective) {
|
||||
callmethod("ThreeDChart.setPerspective", $this->ptr, $perspective);
|
||||
}
|
||||
|
||||
function xAxis() {
|
||||
return new Axis(callmethod("ThreeDChart.xAxis", $this->ptr));
|
||||
}
|
||||
function yAxis() {
|
||||
return new Axis(callmethod("ThreeDChart.yAxis", $this->ptr));
|
||||
}
|
||||
function zAxis() {
|
||||
return new Axis(callmethod("ThreeDChart.zAxis", $this->ptr));
|
||||
}
|
||||
function setZAxisPos($pos) {
|
||||
callmethod("ThreeDChart.setZAxisPos", $this->ptr, $pos);
|
||||
}
|
||||
|
||||
function setColorAxis($x, $y, $alignment, $length, $orientation) {
|
||||
return new ColorAxis(callmethod("ThreeDChart.setColorAxis", $this->ptr, $x, $y, $alignment, $length, $orientation));
|
||||
}
|
||||
function colorAxis() {
|
||||
return new ColorAxis(callmethod("ThreeDChart.colorAxis", $this->ptr));
|
||||
}
|
||||
|
||||
function setWallVisibility($xyVisible, $yzVisible, $zxVisible) {
|
||||
callmethod("ThreeDChart.setWallVisibility", $this->ptr, $xyVisible, $yzVisible, $zxVisible);
|
||||
}
|
||||
function setWallColor($xyColor, $yzColor = -1, $zxColor = -1, $borderColor = -1) {
|
||||
callmethod("ThreeDChart.setWallColor", $this->ptr, $xyColor, $yzColor, $zxColor, $borderColor);
|
||||
}
|
||||
function setWallThickness($xyThickness, $yzThickness = -1, $zxThickness = -1) {
|
||||
callmethod("ThreeDChart.setWallThickness", $this->ptr, $xyThickness, $yzThickness, $zxThickness);
|
||||
}
|
||||
function setWallGrid($majorXGridColor, $majorYGridColor = -1, $majorZGridColor = -1,
|
||||
$minorXGridColor = -1, $minorYGridColor = -1, $minorZGridColor = -1) {
|
||||
callmethod("ThreeDChart.setWallGrid", $this->ptr, $majorXGridColor, $majorYGridColor, $majorZGridColor,
|
||||
$minorXGridColor, $minorYGridColor, $minorZGridColor);
|
||||
}
|
||||
}
|
||||
|
||||
class SurfaceChart extends ThreeDChart
|
||||
{
|
||||
function SurfaceChart($width, $height, $bgColor = BackgroundColor, $edgeColor = Transparent, $raisedEffect = 0) {
|
||||
$this->ptr = callmethod("SurfaceChart.create", $width, $height, $bgColor, $edgeColor, $raisedEffect);
|
||||
@ -2462,16 +2684,6 @@ class SurfaceChart extends BaseChart
|
||||
autoDestroy($this);
|
||||
}
|
||||
|
||||
function setPlotRegion($cx, $cy, $xWidth, $yDepth, $zHeight) {
|
||||
callmethod("SurfaceChart.setPlotRegion", $this->ptr, $cx, $cy, $xWidth, $yDepth, $zHeight);
|
||||
}
|
||||
function setViewAngle($elevation, $rotation = 0, $twist = 0) {
|
||||
callmethod("SurfaceChart.setViewAngle", $this->ptr, $elevation, $rotation, $twist);
|
||||
}
|
||||
function setPerspective($perspective) {
|
||||
callmethod("SurfaceChart.setPerspective", $this->ptr, $perspective);
|
||||
}
|
||||
|
||||
function setData($xData, $yData, $zData) {
|
||||
callmethod("SurfaceChart.setData", $this->ptr, $xData, $yData, $zData);
|
||||
}
|
||||
@ -2506,40 +2718,57 @@ class SurfaceChart extends BaseChart
|
||||
function setBackSideLighting($ambientLight, $diffuseLight, $specularLight, $shininess) {
|
||||
callmethod("SurfaceChart.setBackSideLighting", $this->ptr, $ambientLight, $diffuseLight, $specularLight, $shininess);
|
||||
}
|
||||
}
|
||||
|
||||
function xAxis() {
|
||||
return new Axis(callmethod("SurfaceChart.xAxis", $this->ptr));
|
||||
class ThreeDScatterGroup {
|
||||
function ThreeDScatterGroup($ptr) {
|
||||
$this->ptr = $ptr;
|
||||
}
|
||||
function yAxis() {
|
||||
return new Axis(callmethod("SurfaceChart.yAxis", $this->ptr));
|
||||
function setDataSymbol($symbol, $size = Null, $fillColor = -1, $edgeColor = -1, $lineWidth = 1) {
|
||||
if (is_array($symbol)) {
|
||||
if (is_null($size))
|
||||
$size = 11;
|
||||
$this->setDataSymbol4($symbol, $size, $fillColor, $edgeColor);
|
||||
return;
|
||||
}
|
||||
if (!is_numeric($symbol))
|
||||
return $this->setDataSymbol2($symbol);
|
||||
if (is_null($size))
|
||||
$size = 5;
|
||||
callmethod("ThreeDScatterGroup.setDataSymbol", $this->ptr, $symbol, $size, $fillColor, $edgeColor, $lineWidth);
|
||||
}
|
||||
function zAxis() {
|
||||
return new Axis(callmethod("SurfaceChart.zAxis", $this->ptr));
|
||||
function setDataSymbol2($image) {
|
||||
if (!is_string($image))
|
||||
return $this->setDataSymbol3($image);
|
||||
callmethod("ThreeDScatterGroup.setDataSymbol2", $this->ptr, $image);
|
||||
}
|
||||
function setZAxisPos($pos) {
|
||||
callmethod("SurfaceChart.setZAxisPos", $this->ptr, $pos);
|
||||
function setDataSymbol3($image) {
|
||||
callmethod("ThreeDScatterGroup.setDataSymbol3", $this->ptr, $image->ptr);
|
||||
}
|
||||
function setDataSymbol4($polygon, $size = 11, $fillColor = -1, $edgeColor = -1) {
|
||||
callmethod("ThreeDScatterGroup.setDataSymbol4", $this->ptr, $polygon, $size, $fillColor, $edgeColor);
|
||||
}
|
||||
function setDropLine($dropLineColor = LineColor, $dropLineWidth = 1) {
|
||||
callmethod("ThreeDScatterGroup.setDropLine", $this->ptr, $dropLineColor, $dropLineWidth);
|
||||
}
|
||||
function setLegendIcon($width, $height = -1, $color = -1) {
|
||||
callmethod("ThreeDScatterGroup.setLegendIcon", $this->ptr, $width, $height, $color);
|
||||
}
|
||||
}
|
||||
|
||||
class ThreeDScatterChart extends ThreeDChart
|
||||
{
|
||||
function ThreeDScatterChart($width, $height, $bgColor = BackgroundColor, $edgeColor = Transparent, $raisedEffect = 0) {
|
||||
$this->ptr = callmethod("ThreeDScatterChart.create", $width, $height, $bgColor, $edgeColor, $raisedEffect);
|
||||
$this->xAxis = $this->xAxis();
|
||||
$this->yAxis = $this->yAxis();
|
||||
$this->zAxis = $this->zAxis();
|
||||
$this->colorAxis = $this->colorAxis();
|
||||
autoDestroy($this);
|
||||
}
|
||||
|
||||
function setColorAxis($x, $y, $alignment, $length, $orientation) {
|
||||
return new ColorAxis(callmethod("SurfaceChart.setColorAxis", $this->ptr, $x, $y, $alignment, $length, $orientation));
|
||||
}
|
||||
function colorAxis() {
|
||||
return new ColorAxis(callmethod("SurfaceChart.colorAxis", $this->ptr));
|
||||
}
|
||||
|
||||
function setWallVisibility($xyVisible, $yzVisible, $zxVisible) {
|
||||
callmethod("SurfaceChart.setWallVisibility", $this->ptr, $xyVisible, $yzVisible, $zxVisible);
|
||||
}
|
||||
function setWallColor($xyColor, $yzColor = -1, $zxColor = -1, $borderColor = -1) {
|
||||
callmethod("SurfaceChart.setWallColor", $this->ptr, $xyColor, $yzColor, $zxColor, $borderColor);
|
||||
}
|
||||
function setWallThickness($xyThickness, $yzThickness = -1, $zxThickness = -1) {
|
||||
callmethod("SurfaceChart.setWallThickness", $this->ptr, $xyThickness, $yzThickness, $zxThickness);
|
||||
}
|
||||
function setWallGrid($majorXGridColor, $majorYGridColor = -1, $majorZGridColor = -1,
|
||||
$minorXGridColor = -1, $minorYGridColor = -1, $minorZGridColor = -1) {
|
||||
callmethod("SurfaceChart.setWallGrid", $this->ptr, $majorXGridColor, $majorYGridColor, $majorZGridColor,
|
||||
$minorXGridColor, $minorYGridColor, $minorZGridColor);
|
||||
function addScatterGroup($xData, $yData, $zData, $name = "", $symbol = CircleSymbol, $symbolSize = 5, $fillColor = -1, $edgeColor = -1) {
|
||||
return new ThreeDScatterGroup(callmethod("ThreeDScatterChart.addScatterGroup", $this->ptr, $xData, $yData, $zData, $name, $symbol, $symbolSize, $fillColor, $edgeColor));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3031,6 +3260,29 @@ class RanTable
|
||||
}
|
||||
}
|
||||
|
||||
class RanSeries
|
||||
{
|
||||
function RanSeries($seed) {
|
||||
$this->ptr = callmethod("RanSeries.create", $seed);
|
||||
autoDestroy($this);
|
||||
}
|
||||
function __del__() {
|
||||
callmethod("RanSeries.destroy", $this->ptr);
|
||||
}
|
||||
function getSeries($len, $minValue, $maxValue, $p4 = Null, $p5 = -1E+308, $p6 = 1E+308) {
|
||||
if (is_null($p4))
|
||||
return callmethod("RanSeries.getSeries", $this->ptr, $len, $minValue, $maxValue);
|
||||
else
|
||||
return $this->getSeries2($len, $minValue, $maxValue, $p4, $p5, $p6);
|
||||
}
|
||||
function getSeries2($len, $startValue, $minDelta, $maxDelta, $lowerLimit = -1E+308, $upperLimit = 1E+308) {
|
||||
return callmethod("RanSeries.getSeries2", $this->ptr, $len, $startValue, $minDelta, $maxDelta, $lowerLimit, $upperLimit);
|
||||
}
|
||||
function getDateSeries($len, $startTime, $tickInc, $weekDayOnly = false) {
|
||||
return callmethod("RanSeries.getDateSeries", $this->ptr, $len, $startTime, $tickInc, $weekDayOnly);
|
||||
}
|
||||
}
|
||||
|
||||
class FinanceSimulator
|
||||
{
|
||||
function FinanceSimulator($seed, $startTime, $endTime, $resolution) {
|
||||
@ -3289,7 +3541,7 @@ class WebChartViewer
|
||||
$this->putAttrS(":id", $id);
|
||||
$s = $id."_JsChartViewerState";
|
||||
if (isset($_REQUEST[$s]))
|
||||
$this->putAttrS(":state", $_REQUEST[$s]);
|
||||
$this->putAttrS(":state", get_magic_quotes_gpc() ? stripslashes($_REQUEST[$s]) : $_REQUEST[$s]);
|
||||
}
|
||||
function __del__() {
|
||||
callmethod("WebChartViewer.destroy", $this->ptr);
|
||||
@ -3305,7 +3557,29 @@ class WebChartViewer
|
||||
|
||||
function setChartMetrics($metrics) { $this->putAttrS(":metrics", $metrics); }
|
||||
function getChartMetrics() { return $this->getAttrS(":metrics"); }
|
||||
|
||||
|
||||
function setChartModel($model) { $this->putAttrS(":model", $model); }
|
||||
function getChartModel() { return $this->getAttrS(":model"); }
|
||||
|
||||
function setFullRange($id, $minValue, $maxValue) {
|
||||
callmethod("WebChartViewer.setFullRange", $this->ptr, $id, $minValue, $maxValue);
|
||||
}
|
||||
function getValueAtViewPort($id, $ratio, $isLogScale = false) {
|
||||
return callmethod("WebChartViewer.getValueAtViewPort", $this->ptr, $id, $ratio, $isLogScale);
|
||||
}
|
||||
function getViewPortAtValue($id, $value, $isLogScale = false) {
|
||||
return callmethod("WebChartViewer.getViewPortAtValue", $this->ptr, $id, $value, $isLogScale);
|
||||
}
|
||||
function syncLinearAxisWithViewPort($id, $axis) {
|
||||
callmethod("WebChartViewer.syncAxisWithViewPort", $this->ptr, $axis->ptr, $id, 3);
|
||||
}
|
||||
function syncLogAxisWithViewPort($id, $axis) {
|
||||
callmethod("WebChartViewer.syncAxisWithViewPort", $this->ptr, $axis->ptr, $id, 4);
|
||||
}
|
||||
function syncDateAxisWithViewPort($id, $axis) {
|
||||
callmethod("WebChartViewer.syncAxisWithViewPort", $this->ptr, $axis->ptr, $id, 5);
|
||||
}
|
||||
|
||||
function makeDelayedMap($imageMap, $compress = 0) {
|
||||
global $HTTP_SESSION_VARS, $_SERVER;
|
||||
if ($compress) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user