wip bug 6
This commit is contained in:
1 parent
cabd62221e
commit
afbc3e1f5f
4 files changed
+60
-4
No files matched your search
@@ -38,13 +38,20 @@ class LoadPerformance
|
||||
|
||||
$home_matches = [];
|
||||
$away_matches = [];
|
||||
$playing_date = [];
|
||||
$events = [];
|
||||
$results_per_event = [];
|
||||
$labels = [];
|
||||
foreach ($res as $val) {
|
||||
if ($val->home_id == $home_id or $val->away_id == $home_id or $val->home_id == $away_id or $val->away_id == $away_id) {
|
||||
|
||||
$labels[] = round($val->starttime->diffInDays(Carbon::now()));
|
||||
|
||||
$label_formatted[$val->match_id] = $val->starttime->format('d. F Y H:i');
|
||||
$playing_date[] = $val['starttime']->format('d. F Y H:i');
|
||||
|
||||
$results_per_event[] = $val['gls_h'] . ' : ' . $val['gls_a'];
|
||||
|
||||
$events[] = $val->home->name . ' vs ' . $val->away->name;
|
||||
|
||||
if ($val->home_id == $home_id or $val->away_id == $home_id) {
|
||||
$home_matches[] = $val->match_id;
|
||||
@@ -73,6 +80,9 @@ class LoadPerformance
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => $match->home->name,
|
||||
'playing_date' => $playing_date,
|
||||
'results_per_event' => $results_per_event,
|
||||
'events' => $events,
|
||||
'data' => $homes['all'] ?? [],
|
||||
'spanGaps' => true,
|
||||
'tension' => 0.5,
|
||||
@@ -82,6 +92,9 @@ class LoadPerformance
|
||||
],
|
||||
[
|
||||
'label' => 'Defence',
|
||||
'playing_date' => $playing_date,
|
||||
'results_per_event' => $results_per_event,
|
||||
'events' => $events,
|
||||
'data' => $homes['def'] ?? [],
|
||||
'spanGaps' => true,
|
||||
'tension' => 0.5,
|
||||
@@ -89,9 +102,13 @@ class LoadPerformance
|
||||
'backgroundColor' => '#c10007',
|
||||
'fill' => false,
|
||||
'pointStyle' => $hasdots,
|
||||
'hidden' => true,
|
||||
],
|
||||
[
|
||||
'label' => 'Attak',
|
||||
'playing_date' => $playing_date,
|
||||
'results_per_event' => $results_per_event,
|
||||
'events' => $events,
|
||||
'data' => $homes['att'] ?? [],
|
||||
'spanGaps' => true,
|
||||
'tension' => 0.5,
|
||||
@@ -99,9 +116,13 @@ class LoadPerformance
|
||||
'backgroundColor' => '#c10007',
|
||||
'fill' => false,
|
||||
'pointStyle' => $hasdots,
|
||||
'hidden' => true,
|
||||
],
|
||||
[
|
||||
'label' => 'Midfield',
|
||||
'playing_date' => $playing_date,
|
||||
'results_per_event' => $results_per_event,
|
||||
'events' => $events,
|
||||
'data' => $homes['mid'] ?? [],
|
||||
'spanGaps' => true,
|
||||
'tension' => 0.5,
|
||||
@@ -109,9 +130,13 @@ class LoadPerformance
|
||||
'backgroundColor' => '#c10007',
|
||||
'fill' => false,
|
||||
'pointStyle' => $hasdots,
|
||||
'hidden' => true,
|
||||
],
|
||||
[
|
||||
'label' => $match->away->name,
|
||||
'playing_date' => $playing_date,
|
||||
'results_per_event' => $results_per_event,
|
||||
'events' => $events,
|
||||
'data' => $aways['all'] ?? [],
|
||||
'spanGaps' => true,
|
||||
'tension' => 0.5,
|
||||
@@ -119,9 +144,13 @@ class LoadPerformance
|
||||
'backgroundColor' => '#fdc700',
|
||||
'fill' => false,
|
||||
'pointStyle' => $hasdots,
|
||||
'hidden' => true,
|
||||
],
|
||||
[
|
||||
'label' => 'Defence',
|
||||
'playing_date' => $playing_date,
|
||||
'results_per_event' => $results_per_event,
|
||||
'events' => $events,
|
||||
'data' => $aways['def'] ?? [],
|
||||
'spanGaps' => true,
|
||||
'tension' => 0.5,
|
||||
@@ -129,9 +158,13 @@ class LoadPerformance
|
||||
'backgroundColor' => '#d08700',
|
||||
'fill' => false,
|
||||
'pointStyle' => $hasdots,
|
||||
'hidden' => true,
|
||||
],
|
||||
[
|
||||
'label' => 'Attak',
|
||||
'playing_date' => $playing_date,
|
||||
'results_per_event' => $results_per_event,
|
||||
'events' => $events,
|
||||
'data' => $aways['att'] ?? [],
|
||||
'spanGaps' => true,
|
||||
'tension' => 0.5,
|
||||
@@ -139,9 +172,13 @@ class LoadPerformance
|
||||
'backgroundColor' => '#d08700',
|
||||
'fill' => false,
|
||||
'pointStyle' => $hasdots,
|
||||
'hidden' => true,
|
||||
],
|
||||
[
|
||||
'label' => 'Midfield',
|
||||
'playing_date' => $playing_date,
|
||||
'results_per_event' => $results_per_event,
|
||||
'events' => $events,
|
||||
'data' => $aways['mid'] ?? [],
|
||||
'spanGaps' => true,
|
||||
'tension' => 0.5,
|
||||
@@ -149,6 +186,7 @@ class LoadPerformance
|
||||
'backgroundColor' => '#d08700',
|
||||
'fill' => false,
|
||||
'pointStyle' => $hasdots,
|
||||
'hidden' => true,
|
||||
],
|
||||
],
|
||||
'labels' => $labels,
|
||||
|
||||
Reference in new issue
Block a user