From eae581bb086cc16610505451f1bcb0a1a6a3cda5 Mon Sep 17 00:00:00 2001 From: salam Date: Sun, 30 Aug 2026 21:25:20 +0200 Subject: [PATCH] wip --- app/Filament/Widgets/Data/LoadEvents.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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; + } } }