function pData::addPoints in Visitors 7.2
Same name and namespace in other branches
- 7 pChart/class/pData.class.php \pData::addPoints()
3 calls to pData::addPoints()
- pData::addRandomValues in pChart/
class/ pData.class.php - pData::createFunctionSerie in pChart/
class/ pData.class.php - pData::importFromCSV in pChart/
class/ pData.class.php
File
- pChart/
class/ pData.class.php, line 86
Class
Code
function addPoints($Values, $SerieName = "Serie1") {
if (!isset($this->Data["Series"][$SerieName])) {
$this
->initialise($SerieName);
}
if (is_array($Values)) {
foreach ($Values as $Key => $Value) {
$this->Data["Series"][$SerieName]["Data"][] = $Value;
}
}
else {
$this->Data["Series"][$SerieName]["Data"][] = $Values;
}
if ($Values != VOID) {
$StrippedData = $this
->stripVOID($this->Data["Series"][$SerieName]["Data"]);
if (empty($StrippedData)) {
$this->Data["Series"][$SerieName]["Max"] = 0;
$this->Data["Series"][$SerieName]["Min"] = 0;
return 0;
}
$this->Data["Series"][$SerieName]["Max"] = max($StrippedData);
$this->Data["Series"][$SerieName]["Min"] = min($StrippedData);
}
}