This commit is contained in:
salam committed 2026-06-16 11:26:04 +02:00
1 parent 48b40d7555
commit c2c52fe37d
1 file changed
+1 -1
+1 -1
View File
@@ -116,7 +116,7 @@ class StatsMedianAverage extends StatsOverviewWidget
$boxes[] = Stat::make('Avg ' . $statistic_type, self::template('avhome', 'avaway', $home_team, $away_team))->extraAttributes(['x-init' => "animate('avhome', $value_home); animate('avaway', $value_away, 0)"]);
foreach ($data['datasets'] as $value) {
if ($value['label'] == "Average League") {
$boxes[] = Stat::make('Avg League', new HtmlString('<div id="number-of-events">' . $value['data'][0] . '</div>'))->extraAttributes(['x-init' => "animate('number-of-events', $total_home, 0)"]);
$boxes[] = Stat::make('Avg League', new HtmlString('<div id="number-of-events">' . $value['data'][0] ?? 0 . '</div>'))->extraAttributes(['x-init' => "animate('number-of-events', $total_home, 0)"]);
}
}
$boxes[] = Stat::make('Med ' . $statistic_type, self::template('mehome', 'meaway', $home_team, $away_team))->extraAttributes(['x-init' => "animate('mehome', $median_home); animate('meaway', $median_away, 0)"]);