43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Widgets;
|
|
|
|
// use App\Actions\Statistics\StatisticEvents;
|
|
use App\Actions\Statistics\LoadEvents;
|
|
use App\Actions\Statistics\StatisticType;
|
|
use Filament\Widgets\ChartWidget;
|
|
use Filament\Widgets\Concerns\InteractsWithPageFilters;
|
|
|
|
class PunctualChart extends ChartWidget
|
|
{
|
|
use InteractsWithPageFilters;
|
|
|
|
/**
|
|
* 1. Ein Diagramm, das die Werte des ausgewählten Feldes GRUPPE 2 (HEIM/AUSWÄRTS/VERANSTALTUNG) darstellt,
|
|
* mit dem Punktwert auf der Ordinate und dem aufsteigenden Datum auf der Abszisse,
|
|
* und das den Mittelwert und den Medianwert für die ausgewählte Statistik an den ausgewählten Daten enthält.
|
|
*/
|
|
protected ?string $pollingInterval = null;
|
|
|
|
public ?string $header;
|
|
|
|
public function getDescription(): ?string
|
|
{
|
|
return 'Punctual';
|
|
}
|
|
|
|
protected function getData(): array
|
|
{
|
|
$this->heading = StatisticType::get($this->filters);
|
|
|
|
$data = LoadEvents::load($this->filters);
|
|
|
|
return $data;
|
|
}
|
|
|
|
protected function getType(): string
|
|
{
|
|
return 'line';
|
|
}
|
|
}
|