diff --git a/app/Filament/Widgets/Data/LoadEvents.php b/app/Filament/Widgets/Data/LoadEvents.php index a7012acf..22042d18 100644 --- a/app/Filament/Widgets/Data/LoadEvents.php +++ b/app/Filament/Widgets/Data/LoadEvents.php @@ -257,11 +257,13 @@ class LoadEvents } } $n = max(count($dataset_home), count($dataset_away), count($dataset_away2), count($dataset_home2)); - $f = array_first($labels); - $step = round($f / $n); - $labels = []; - for ($i = $f; $i >= 0; $i -= $step) { - $labels[] = $i; + if($n){ + $f = array_first($labels); + $step = round($f / $n); + $labels = []; + for ($i = $f; $i >= 0; $i -= $step) { + $labels[] = $i; + } } }