This commit is contained in:
salam committed 2026-05-23 08:38:34 +02:00
1 parent 2734b06350
commit fbaadcd248
9 files changed
+213 -219

No files matched your search

@@ -0,0 +1,53 @@
<?php
namespace App\Filament\Widgets;
use App\Filament\Widgets\Data\HelperMoveingAverage;
use App\Filament\Widgets\Data\HelperStatisticType;
use App\Filament\Widgets\Data\LoadPlayer;
use Filament\Widgets\ChartWidget;
use Filament\Widgets\Concerns\InteractsWithPageFilters;
class ChartMovingAveragePlayer extends ChartWidget
{
use InteractsWithPageFilters;
protected ?string $pollingInterval = null;
public ?string $header;
protected ?array $options = [
'plugins' => [
'legend' => [
'display' => false,
],
],
];
public function getDescription(): ?string
{
return 'Player Moving Average';
}
protected function getData(): array
{
if ($this->filters['statistic_type'] == 'crn') {
return [];
}
$this->heading = HelperStatisticType::get($this->filters);
$data = LoadPlayer::load($this->filters);
if ($data) {
HelperMoveingAverage::get($data);
}
return $data;
}
protected function getType(): string
{
return 'line';
}
}