Upgrade jpgrah to 4.3.4
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

This commit is contained in:
Nigel Sheldon 2021-01-03 17:10:26 +01:00
commit b5868f05f6
72 changed files with 19157 additions and 10327 deletions

View file

@ -1,14 +1,14 @@
<?php
/*=======================================================================
// File: JPGRAPH_ERROR.PHP
// Description: Error plot extension for JpGraph
// Created: 2001-01-08
// Ver: $Id: jpgraph_error.php 781 2006-10-08 08:07:47Z ljp $
//
// Copyright (c) Aditus Consulting. All rights reserved.
//========================================================================
*/
// File: JPGRAPH_ERROR.PHP
// Description: Error plot extension for JpGraph
// Created: 2001-01-08
// Ver: $Id: jpgraph_error.php 1106 2009-02-22 20:16:35Z ljp $
//
// Copyright (c) Asial Corporation. All rights reserved.
//========================================================================
*/
//===================================================
// CLASS ErrorPlot
// Description: Error plot with min/max value for
@ -17,16 +17,17 @@
class ErrorPlot extends Plot
{
private $errwidth=2;
//---------------
// CONSTRUCTOR
public function ErrorPlot($datay, $datax=false)
public function __construct($datay, $datax=false)
{
$this->Plot($datay, $datax);
parent::__construct($datay, $datax);
$this->numpoints /= 2;
}
//---------------
// PUBLIC METHODS
// Gets called before any axis are stroked
public function PreStrokeAdjust($graph)
{
@ -42,7 +43,7 @@ class ErrorPlot extends Plot
$graph->SetTextScaleOff($b);
//$graph->xaxis->scale->ticks->SupressMinorTickMarks();
}
// Method description
public function Stroke($img, $xscale, $yscale)
{
@ -70,7 +71,7 @@ class ErrorPlot extends Plot
}
if (!is_numeric($x) ||
!is_numeric($this->coords[0][$i*2]) || !is_numeric($this->coords[0][$i*2+1])) {
!is_numeric($this->coords[0][$i*2]) || !is_numeric($this->coords[0][$i*2+1])) {
continue;
}
@ -97,9 +98,9 @@ class ErrorLinePlot extends ErrorPlot
public $line=null;
//---------------
// CONSTRUCTOR
public function ErrorLinePlot($datay, $datax=false)
public function __construct($datay, $datax=false)
{
$this->ErrorPlot($datay, $datax);
parent::__construct($datay, $datax);
// Calculate line coordinates as the average of the error limits
$n = count($datay);
for ($i=0; $i < $n; $i+=2) {
@ -117,7 +118,7 @@ class ErrorLinePlot extends ErrorPlot
}
$this->line->Legend($graph);
}
public function Stroke($img, $xscale, $yscale)
{
parent::Stroke($img, $xscale, $yscale);
@ -136,7 +137,7 @@ class LineErrorPlot extends ErrorPlot
//---------------
// CONSTRUCTOR
// Data is (val, errdeltamin, errdeltamax)
public function LineErrorPlot($datay, $datax=false)
public function __construct($datay, $datax=false)
{
$ly=array();
$ey=array();
@ -150,7 +151,7 @@ class LineErrorPlot extends ErrorPlot
$ey[]=$datay[$i]+$datay[$i+1];
$ey[]=$datay[$i]+$datay[$i+2];
}
$this->ErrorPlot($ey, $datax);
parent::__construct($ey, $datax);
$this->line=new LinePlot($ly, $datax);
}
@ -163,7 +164,7 @@ class LineErrorPlot extends ErrorPlot
}
$this->line->Legend($graph);
}
public function Stroke($img, $xscale, $yscale)
{
parent::Stroke($img, $xscale, $yscale);