From fbb368402242a8ffc31c33b78fd8b11c018a81d8 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Thu, 23 Mar 2023 12:43:02 -0600 Subject: [PATCH] Add a condition to 'restart' the color index for the status pie chart --- app/Helpers/Helper.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php index df498da8c9..78693b60c4 100644 --- a/app/Helpers/Helper.php +++ b/app/Helpers/Helper.php @@ -334,7 +334,11 @@ class Helper '#92896B', ]; + $total_colors = count($colors); + if ($index >= $total_colors) { + $index = $index - $total_colors; + } return $colors[$index]; }