From 2494db3ff0494acf71083e84f8bc13c8216cebed Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 20 Jul 2021 10:18:08 +0200 Subject: [PATCH] fixed error with percentiles in graphs --- pandora_console/include/functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 7c8fa7612c..b5c75450b0 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -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);