wip bug 6
This commit is contained in:
1 parent
cabd62221e
commit
afbc3e1f5f
4 files changed
+58
-2
No files matched your search
@@ -15,7 +15,7 @@
|
|||||||
## 2) CALCOLO DELLA MEDIANA: cambiamolo in questo modo: ordiniamo tutti i valori dal minore al maggiore, se il totale dati è dispari prendiamo il valore a metà dell'elenco, se è pari facciamo la media dei due valori a metà dell'elenco
|
## 2) CALCOLO DELLA MEDIANA: cambiamolo in questo modo: ordiniamo tutti i valori dal minore al maggiore, se il totale dati è dispari prendiamo il valore a metà dell'elenco, se è pari facciamo la media dei due valori a metà dell'elenco
|
||||||
## 3) RIEPILOGO DATI: sostituire HOME con IN FAVOUR e AWAY con AGAINST
|
## 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
|
## 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
|
## 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
|
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
|
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
|
8) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES sono invertiti WIN con LOST
|
||||||
|
|||||||
@@ -47,6 +47,15 @@ class ChartEventPerf extends ChartWidget
|
|||||||
interaction: {
|
interaction: {
|
||||||
intersect: false,
|
intersect: false,
|
||||||
},
|
},
|
||||||
|
plugins: {
|
||||||
|
tooltip: {
|
||||||
|
callbacks: {
|
||||||
|
label: (context) => {
|
||||||
|
return [' '+context.parsed.y, ' '+context.dataset.playing_date[context.dataIndex], ' '+context.dataset.events[context.dataIndex], ' '+context.dataset.results_per_event[context.dataIndex]];
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
title: {
|
title: {
|
||||||
|
|||||||
@@ -55,6 +55,15 @@ class ChartEventPerfMoAv extends ChartWidget
|
|||||||
interaction: {
|
interaction: {
|
||||||
intersect: false,
|
intersect: false,
|
||||||
},
|
},
|
||||||
|
plugins: {
|
||||||
|
tooltip: {
|
||||||
|
callbacks: {
|
||||||
|
label: (context) => {
|
||||||
|
return [' '+context.parsed.y, ' '+context.dataset.playing_date[context.dataIndex], ' '+context.dataset.events[context.dataIndex], ' '+context.dataset.results_per_event[context.dataIndex]];
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
title: {
|
title: {
|
||||||
|
|||||||
@@ -38,13 +38,20 @@ class LoadPerformance
|
|||||||
|
|
||||||
$home_matches = [];
|
$home_matches = [];
|
||||||
$away_matches = [];
|
$away_matches = [];
|
||||||
|
$playing_date = [];
|
||||||
|
$events = [];
|
||||||
|
$results_per_event = [];
|
||||||
$labels = [];
|
$labels = [];
|
||||||
foreach ($res as $val) {
|
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) {
|
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()));
|
$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) {
|
if ($val->home_id == $home_id or $val->away_id == $home_id) {
|
||||||
$home_matches[] = $val->match_id;
|
$home_matches[] = $val->match_id;
|
||||||
@@ -73,6 +80,9 @@ class LoadPerformance
|
|||||||
'datasets' => [
|
'datasets' => [
|
||||||
[
|
[
|
||||||
'label' => $match->home->name,
|
'label' => $match->home->name,
|
||||||
|
'playing_date' => $playing_date,
|
||||||
|
'results_per_event' => $results_per_event,
|
||||||
|
'events' => $events,
|
||||||
'data' => $homes['all'] ?? [],
|
'data' => $homes['all'] ?? [],
|
||||||
'spanGaps' => true,
|
'spanGaps' => true,
|
||||||
'tension' => 0.5,
|
'tension' => 0.5,
|
||||||
@@ -82,6 +92,9 @@ class LoadPerformance
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'Defence',
|
'label' => 'Defence',
|
||||||
|
'playing_date' => $playing_date,
|
||||||
|
'results_per_event' => $results_per_event,
|
||||||
|
'events' => $events,
|
||||||
'data' => $homes['def'] ?? [],
|
'data' => $homes['def'] ?? [],
|
||||||
'spanGaps' => true,
|
'spanGaps' => true,
|
||||||
'tension' => 0.5,
|
'tension' => 0.5,
|
||||||
@@ -89,9 +102,13 @@ class LoadPerformance
|
|||||||
'backgroundColor' => '#c10007',
|
'backgroundColor' => '#c10007',
|
||||||
'fill' => false,
|
'fill' => false,
|
||||||
'pointStyle' => $hasdots,
|
'pointStyle' => $hasdots,
|
||||||
|
'hidden' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'Attak',
|
'label' => 'Attak',
|
||||||
|
'playing_date' => $playing_date,
|
||||||
|
'results_per_event' => $results_per_event,
|
||||||
|
'events' => $events,
|
||||||
'data' => $homes['att'] ?? [],
|
'data' => $homes['att'] ?? [],
|
||||||
'spanGaps' => true,
|
'spanGaps' => true,
|
||||||
'tension' => 0.5,
|
'tension' => 0.5,
|
||||||
@@ -99,9 +116,13 @@ class LoadPerformance
|
|||||||
'backgroundColor' => '#c10007',
|
'backgroundColor' => '#c10007',
|
||||||
'fill' => false,
|
'fill' => false,
|
||||||
'pointStyle' => $hasdots,
|
'pointStyle' => $hasdots,
|
||||||
|
'hidden' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'Midfield',
|
'label' => 'Midfield',
|
||||||
|
'playing_date' => $playing_date,
|
||||||
|
'results_per_event' => $results_per_event,
|
||||||
|
'events' => $events,
|
||||||
'data' => $homes['mid'] ?? [],
|
'data' => $homes['mid'] ?? [],
|
||||||
'spanGaps' => true,
|
'spanGaps' => true,
|
||||||
'tension' => 0.5,
|
'tension' => 0.5,
|
||||||
@@ -109,9 +130,13 @@ class LoadPerformance
|
|||||||
'backgroundColor' => '#c10007',
|
'backgroundColor' => '#c10007',
|
||||||
'fill' => false,
|
'fill' => false,
|
||||||
'pointStyle' => $hasdots,
|
'pointStyle' => $hasdots,
|
||||||
|
'hidden' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => $match->away->name,
|
'label' => $match->away->name,
|
||||||
|
'playing_date' => $playing_date,
|
||||||
|
'results_per_event' => $results_per_event,
|
||||||
|
'events' => $events,
|
||||||
'data' => $aways['all'] ?? [],
|
'data' => $aways['all'] ?? [],
|
||||||
'spanGaps' => true,
|
'spanGaps' => true,
|
||||||
'tension' => 0.5,
|
'tension' => 0.5,
|
||||||
@@ -119,9 +144,13 @@ class LoadPerformance
|
|||||||
'backgroundColor' => '#fdc700',
|
'backgroundColor' => '#fdc700',
|
||||||
'fill' => false,
|
'fill' => false,
|
||||||
'pointStyle' => $hasdots,
|
'pointStyle' => $hasdots,
|
||||||
|
'hidden' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'Defence',
|
'label' => 'Defence',
|
||||||
|
'playing_date' => $playing_date,
|
||||||
|
'results_per_event' => $results_per_event,
|
||||||
|
'events' => $events,
|
||||||
'data' => $aways['def'] ?? [],
|
'data' => $aways['def'] ?? [],
|
||||||
'spanGaps' => true,
|
'spanGaps' => true,
|
||||||
'tension' => 0.5,
|
'tension' => 0.5,
|
||||||
@@ -129,9 +158,13 @@ class LoadPerformance
|
|||||||
'backgroundColor' => '#d08700',
|
'backgroundColor' => '#d08700',
|
||||||
'fill' => false,
|
'fill' => false,
|
||||||
'pointStyle' => $hasdots,
|
'pointStyle' => $hasdots,
|
||||||
|
'hidden' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'Attak',
|
'label' => 'Attak',
|
||||||
|
'playing_date' => $playing_date,
|
||||||
|
'results_per_event' => $results_per_event,
|
||||||
|
'events' => $events,
|
||||||
'data' => $aways['att'] ?? [],
|
'data' => $aways['att'] ?? [],
|
||||||
'spanGaps' => true,
|
'spanGaps' => true,
|
||||||
'tension' => 0.5,
|
'tension' => 0.5,
|
||||||
@@ -139,9 +172,13 @@ class LoadPerformance
|
|||||||
'backgroundColor' => '#d08700',
|
'backgroundColor' => '#d08700',
|
||||||
'fill' => false,
|
'fill' => false,
|
||||||
'pointStyle' => $hasdots,
|
'pointStyle' => $hasdots,
|
||||||
|
'hidden' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'Midfield',
|
'label' => 'Midfield',
|
||||||
|
'playing_date' => $playing_date,
|
||||||
|
'results_per_event' => $results_per_event,
|
||||||
|
'events' => $events,
|
||||||
'data' => $aways['mid'] ?? [],
|
'data' => $aways['mid'] ?? [],
|
||||||
'spanGaps' => true,
|
'spanGaps' => true,
|
||||||
'tension' => 0.5,
|
'tension' => 0.5,
|
||||||
@@ -149,6 +186,7 @@ class LoadPerformance
|
|||||||
'backgroundColor' => '#d08700',
|
'backgroundColor' => '#d08700',
|
||||||
'fill' => false,
|
'fill' => false,
|
||||||
'pointStyle' => $hasdots,
|
'pointStyle' => $hasdots,
|
||||||
|
'hidden' => true,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'labels' => $labels,
|
'labels' => $labels,
|
||||||
|
|||||||
Reference in new issue
Block a user