コード例 #1
0
ファイル: stacked.php プロジェクト: enormego/EightPHP
 function setScalar()
 {
     $maxValue = 100;
     $maxValue = max($maxValue, gchartutil::getMaxOfArray(gchartutil::addArrays($this->values)));
     if ($maxValue < 100) {
         $this->scalar = 1;
     } else {
         $this->scalar = 100 / $maxValue;
     }
 }
コード例 #2
0
ファイル: gchartutil.php プロジェクト: enormego/EightPHP
 public static function getMaxOfArray($ArrayToCheck)
 {
     $maxValue = 1;
     foreach ($ArrayToCheck as $temp) {
         if (is_array($temp)) {
             $maxValue = max($maxValue, gchartutil::getMaxOfArray($temp));
         } else {
             $maxValue = max($maxValue, $temp);
         }
     }
     return $maxValue;
 }