wip design

This commit is contained in:
salam committed 2026-05-28 10:13:27 +02:00
1 parent a862442e9f
commit bf2aa801fc
13 files changed
+283 -266

No files matched your search

+57
View File
@@ -0,0 +1,57 @@
<?php
namespace App\Filament\Widgets;
use App\Filament\Widgets\Data\HelperStatisticType;
use App\Filament\Widgets\Data\LoadPlayer;
use Filament\Widgets\ChartWidget;
use Filament\Widgets\Concerns\InteractsWithPageFilters;
class ChartPlayer extends ChartWidget
{
use InteractsWithPageFilters;
protected ?string $pollingInterval = null;
protected bool $isCollapsible = true;
protected ?array $options = [
'plugins' => [
'legend' => [
'display' => false,
],
],
'interaction' => [
'intersect' => false,
],
'callbacks' => [
'label' => 'function(context) {
return " Count: " + context.raw;
}',
],
];
protected function getData(): array
{
if ($this->filters['statistic_type'] == 'crn') {
return [];
}
$this->heading = 'Player';
$this->description = HelperStatisticType::get($this->filters);
if (isset($data['description'])) {
$this->description .= $data['description'];
}
$data = LoadPlayer::load($this->filters);
return $data;
}
protected function getType(): string
{
return 'line';
}
}