function pChart::validateData in Visitors 7.0
Same name and namespace in other branches
- 8 pchart/pChart.inc \pChart::validateData()
20 calls to pChart::validateData()
- pChart::drawArea in pchart/
pChart.inc - pChart::drawBarGraph in pchart/
pChart.inc - pChart::drawBasicPieGraph in pchart/
pChart.inc - pChart::drawCubicCurve in pchart/
pChart.inc - pChart::drawFilledCubicCurve in pchart/
pChart.inc
File
- pchart/
pChart.inc, line 2533
Class
Code
function validateData($FunctionName, &$Data) {
$DataSummary = "";
foreach ($Data as $key => $Values) {
foreach ($Values as $key2 => $Value) {
if (!isset($DataSummary[$key2])) {
$DataSummary[$key2] = 1;
}
else {
$DataSummary[$key2]++;
}
}
}
if (max($DataSummary) == 0) {
$this->Errors[] = "[Warning] " . $FunctionName . " - No data set.";
}
foreach ($DataSummary as $key => $Value) {
if ($Value < max($DataSummary)) {
$this->Errors[] = "[Warning] " . $FunctionName . " - Missing data in serie " . $key . ".";
}
}
}