wip bug 7
This commit is contained in:
1 parent
b656d5d993
commit
e6129fbdf6
3 files changed
+6
-11
No files matched your search
@@ -16,8 +16,8 @@
|
||||
## 3) RIEPILOGO DATI: sostituire HOME con IN FAVOUR e AWAY con AGAINST
|
||||
## 4) CALCOLO SBAGLIATO di CARDS AWAY di qualsiasi squadra. Viene visualizzato sempre 0 ma i dati sono presenti nel DB
|
||||
## 5) Aggiungere, nel caso l'operatore scelga di visualizzare i dati statistici GOALS a livello di EVENTS, anche il grafico relativo alle Aspettative Goals Fatte e Subite che possiamo denominare EG-In Favour e EG-Against
|
||||
6) Aggiungere nel Grafico Performance anche i dati della partita (Data / Home / Away / Risultato) come per gli altri grafici
|
||||
7) Il Grafico della Moving Average per Events Performance secondo me è sbagliato quindi probabilmnete c'è un errore nel calcolo della Moving Average
|
||||
## 6) Aggiungere nel Grafico Performance anche i dati della partita (Data / Home / Away / Risultato) come per gli altri grafici
|
||||
## 7) Il Grafico della Moving Average per Events Performance secondo me è sbagliato quindi probabilmnete c'è un errore nel calcolo della Moving Average
|
||||
8) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES sono invertiti WIN con LOST
|
||||
9) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES è opportuno sostituire Win con 1, Draw con X e Lost con 2
|
||||
10) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES sono sbagliate le Average Goals
|
||||
|
||||
@@ -16,15 +16,15 @@ class HelperMoveingAveragePerformens
|
||||
foreach ($datasets as $k => $dataset) {
|
||||
$arr = $dataset['data'];
|
||||
|
||||
self::fillHoles($arr);
|
||||
// dd($arr);
|
||||
|
||||
$new = [];
|
||||
$last = count($arr);
|
||||
foreach ($arr as $key => $value) {
|
||||
if ($key == 1 && $last > 2) {
|
||||
$new[] = round(($arr[0] + $value + $arr[2]) / 3, 1);
|
||||
$new[] = round(($arr[0] + $value + $arr[2]) / 3, 2);
|
||||
} elseif ($key > 1 && $key < $last - 1) {
|
||||
$new[] = round(($arr[$key - 1] + $value + $arr[$key + 1]) / 3, 1);
|
||||
$new[] = round(($arr[$key - 1] + $value + $arr[$key + 1]) / 3, 2);
|
||||
}
|
||||
}
|
||||
$data['datasets'][$k]['data'] = $new;
|
||||
|
||||
@@ -31,6 +31,7 @@ class LoadPerformance
|
||||
}
|
||||
|
||||
$match = StatisticFixtures::with('home')->with('away')->where('id', $match_id)->first();
|
||||
|
||||
$home_id = $match->home_id;
|
||||
$away_id = $match->away_id;
|
||||
|
||||
@@ -55,19 +56,13 @@ class LoadPerformance
|
||||
|
||||
if ($val->home_id == $home_id or $val->away_id == $home_id) {
|
||||
$home_matches[] = $val->match_id;
|
||||
} else {
|
||||
$home_matches[] = null;
|
||||
}
|
||||
if ($val->home_id == $away_id or $val->away_id == $away_id) {
|
||||
$away_matches[] = $val->match_id;
|
||||
} else {
|
||||
$away_matches[] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// dd($away_matches);
|
||||
|
||||
$res = StatistikoPlayer::whereIn('match_id', $home_matches)->select('match_id', 'minutes_played', 'playerrating_value', 'player_position')->get();
|
||||
$homes = self::filterMatches($res, $home_matches);
|
||||
|
||||
|
||||
Reference in new issue
Block a user