function pData::getSerieMedian in Visitors 7
Same name and namespace in other branches
- 7.2 pChart/class/pData.class.php \pData::getSerieMedian()
File
- pChart/
class/ pData.class.php, line 346
Class
Code
function getSerieMedian($Serie) {
if (isset($this->Data["Series"][$Serie])) {
$SerieData = $this
->stripVOID($this->Data["Series"][$Serie]["Data"]);
sort($SerieData);
$SerieCenter = floor(sizeof($SerieData) / 2);
if (isset($SerieData[$SerieCenter])) {
return $SerieData[$SerieCenter];
}
else {
return NULL;
}
}
else {
return NULL;
}
}