function pData::limits in Visitors 7
Same name and namespace in other branches
- 7.2 pChart/class/pData.class.php \pData::limits()
File
- pChart/
class/ pData.class.php, line 247
Class
Code
function limits() {
$GlobalMin = ABSOLUTE_MAX;
$GlobalMax = ABSOLUTE_MIN;
foreach ($this->Data["Series"] as $Key => $Value) {
if ($this->Data["Abscissa"] != $Key && $this->Data["Series"][$Key]["isDrawable"] == TRUE) {
if ($GlobalMin > $this->Data["Series"][$Key]["Min"]) {
$GlobalMin = $this->Data["Series"][$Key]["Min"];
}
if ($GlobalMax < $this->Data["Series"][$Key]["Max"]) {
$GlobalMax = $this->Data["Series"][$Key]["Max"];
}
}
}
$this->Data["Min"] = $GlobalMin;
$this->Data["Max"] = $GlobalMax;
return array(
$GlobalMin,
$GlobalMax,
);
}