statistic wip
This commit is contained in:
1 parent
01a3f41ec0
commit
d6620fb0a1
10 files changed
+408
-333
No files matched your search
@@ -2,19 +2,40 @@
|
||||
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
// use App\Actions\Statistics\StatisticEvents;
|
||||
use App\Actions\Statistics\StatisticType;
|
||||
use Filament\Widgets\ChartWidget;
|
||||
use Filament\Widgets\Concerns\InteractsWithPageFilters;
|
||||
|
||||
class PunctualChart extends ChartWidget
|
||||
{
|
||||
public ?array $filters = [];
|
||||
use InteractsWithPageFilters;
|
||||
|
||||
protected ?string $pollingInterval = null;
|
||||
|
||||
public ?string $header;
|
||||
|
||||
public function getDescription(): ?string
|
||||
{
|
||||
return 'Punctual';
|
||||
}
|
||||
|
||||
protected function getData(): array
|
||||
{
|
||||
$this->heading = $this->header;
|
||||
$this->heading = StatisticType::get($this->filters);
|
||||
|
||||
return $this->filters;
|
||||
$data = [
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => 'test',
|
||||
'data' => [0, 10, 5, 2, 21, 32, 45, 74, 65, 45, 77, 89],
|
||||
'backgroundColor' => '#36A2EB',
|
||||
],
|
||||
],
|
||||
'labels' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function getType(): string
|
||||
|
||||
Reference in new issue
Block a user