wip
This commit is contained in:
1 parent
afbc3e1f5f
commit
309c2b8a6e
1 file changed
+16
-4
@@ -72,15 +72,27 @@ class StatsMedianAverage extends StatsOverviewWidget
|
||||
// ];
|
||||
// }
|
||||
|
||||
$median_home = self::getMedian($arr_home);
|
||||
$median_away = self::getMedian($arr_away);
|
||||
if ($arr_home)
|
||||
$median_home = self::getMedian($arr_home);
|
||||
else
|
||||
$median_home = 0;
|
||||
if ($arr_away)
|
||||
$median_away = self::getMedian($arr_away);
|
||||
else
|
||||
$median_away = 0;
|
||||
|
||||
$win = $data['results']['w'] ? number_format(Round::odd($total_home / $data['results']['w']), 2) : 0;
|
||||
$draw = $data['results']['d'] ? number_format(Round::odd($total_home / $data['results']['d']), 2) : 0;
|
||||
$lost = $data['results']['l'] ? number_format(Round::odd($total_home / $data['results']['l']), 2) : 0;
|
||||
|
||||
$value_home = number_format($summe_home / $total_home, 1);
|
||||
$value_away = number_format($summe_away / $total_away, 1);
|
||||
if ($total_home)
|
||||
$value_home = number_format($summe_home / $total_home, 1);
|
||||
else
|
||||
$value_home = 0;
|
||||
if ($total_away)
|
||||
$value_away = number_format($summe_away / $total_away, 1);
|
||||
else
|
||||
$value_away = 0;
|
||||
|
||||
return [
|
||||
Stat::make('Number of events', new HtmlString('<div id="number-of-events">' . $total_home . '</div>'))->extraAttributes(['x-init' => "animate('number-of-events', $total_home)"]),
|
||||
|
||||
Reference in new issue
Block a user