wip
This commit is contained in:
1 parent
fb8518597f
commit
90c3ad32cb
6 files changed
+399
-264
No files matched your search
@@ -3,11 +3,10 @@
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
use App\Actions\Statistics\LoadEvents;
|
||||
use App\Actions\Statistics\MoveingAverage;
|
||||
use App\Actions\Statistics\StatisticType;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Widgets\ChartWidget;
|
||||
use Filament\Widgets\Concerns\InteractsWithPageFilters;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class MovingAverageChart extends ChartWidget
|
||||
{
|
||||
@@ -26,33 +25,9 @@ class MovingAverageChart extends ChartWidget
|
||||
{
|
||||
$this->heading = StatisticType::get($this->filters);
|
||||
|
||||
if (! $this->filters['league_id']) {
|
||||
return [];
|
||||
}
|
||||
if (! $this->filters['team_id']) {
|
||||
// Notification::make()
|
||||
// ->title('Team is missing')
|
||||
// ->warning()
|
||||
// ->send();
|
||||
return [];
|
||||
}
|
||||
$data = LoadEvents::load($this->filters);
|
||||
|
||||
// Log::info($this->filters);
|
||||
|
||||
// $tmp = LoadEvents::load($this->filters);
|
||||
// Log::info($tmp);
|
||||
|
||||
$data = [
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => 'test',
|
||||
'data' => [0, 10, 5, 2, 21, 32, 45, 74, 65, 45, 77, 89],
|
||||
'borderColor' => '#00c950',
|
||||
'backgroundColor' => '#00c950',
|
||||
],
|
||||
],
|
||||
'labels' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
];
|
||||
MoveingAverage::get($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user