Files
nuhodds_fi4/app/Filament/Widgets/MovingAverageChartPlayer.php
T

49 lines
976 B
PHP

<?php
namespace App\Filament\Widgets;
use App\Actions\Statistics\LoadEvents;
use App\Actions\Statistics\StatisticType;
use Filament\Widgets\ChartWidget;
use Filament\Widgets\Concerns\InteractsWithPageFilters;
class MovingAverageChartPlayer 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
{
$this->heading = StatisticType::get($this->filters);
$data = LoadEvents::load($this->filters);
if ($data) {
// MoveingAveragePlayer::get($data);
}
return $data;
}
protected function getType(): string
{
return 'line';
}
}