Add a condition to 'restart' the color index for the status pie chart

This commit is contained in:
Ivan Nieto Vivanco 2023-03-23 12:43:02 -06:00
parent e8e1ada776
commit fbb3684022

View file

@ -334,7 +334,11 @@ class Helper
'#92896B', '#92896B',
]; ];
$total_colors = count($colors);
if ($index >= $total_colors) {
$index = $index - $total_colors;
}
return $colors[$index]; return $colors[$index];
} }