mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
fixed error with percentiles in graphs
This commit is contained in:
parent
9183110028
commit
2494db3ff0
@ -3284,8 +3284,10 @@ function extract_column($array, $column)
|
||||
|
||||
function get_percentile($percentile, $array)
|
||||
{
|
||||
global $config;
|
||||
|
||||
sort($array);
|
||||
$index = (($percentile / 100) * count($array));
|
||||
$index = (($config['percentil'] / 100) * count($array));
|
||||
|
||||
if (floor($index) == $index) {
|
||||
$result = (($array[($index - 1)] + $array[$index]) / 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user