| @@ 296-308 (lines=13) @@ | ||
| 293 | * @param int $total the total count | |
| 294 | * @return string | |
| 295 | */ | |
| 296 | public function _bar($freq, $maxfreq, $total) | |
| 297 |     { | |
| 298 | $fact = floatval(($maxfreq > 40) ? 40 / $maxfreq : 1); | |
| 299 | $niter = round($freq * $fact); | |
| 300 | $out = ""; | |
| 301 |         for ($i = 0; $i < $niter; $i++) { | |
| 302 | $out .= "*"; | |
| 303 | } | |
| 304 | ||
| 305 |         return $out . sprintf(" (%.1f%%)", $freq / $total * 100); | |
| 306 | } | |
| 307 | ||
| 308 | /** | |
| 309 | * Returns a subset of the bins array by bin value type | |
| 310 | * | |
| 311 | * @access private | |
| @@ 105-117 (lines=13) @@ | ||
| 102 | * @param int $total the total count | |
| 103 | * @return string | |
| 104 | */ | |
| 105 | public function _bar($freq, $maxfreq, $total) | |
| 106 |     { | |
| 107 | $fact = floatval(($maxfreq > 40) ? 40 / $maxfreq : 1); | |
| 108 | $niter = round($freq * $fact); | |
| 109 | $out = ""; | |
| 110 |         for ($i = 0; $i < $niter; $i++) { | |
| 111 | $out .= "*"; | |
| 112 | } | |
| 113 | ||
| 114 |         return $out . sprintf(" (%.1f%%)", $freq / $total * 100); | |
| 115 | } | |
| 116 | ||
| 117 | /** | |
| 118 | * Prints the histogram data statistics | |
| 119 | * | |
| 120 | * @access private | |