buhack
buhack
FFilament
Created by buhack on 9/11/2024 in #❓┊help
widget
first 4 stats in one widget
protected static ?int $sort = 1;

protected int|string|array $columnSpan = 12;

protected function getStats(): array
{
return [
Stat::make('Kalan randevu (Bugün)', 0),
Stat::make('Toplam randevu (Bugün)', 0),
Stat::make('Tamamlanan randevu (Bugün)',0),
Stat::make('İptal edilen randevu (Bugün)',0),
];
}
protected static ?int $sort = 1;

protected int|string|array $columnSpan = 12;

protected function getStats(): array
{
return [
Stat::make('Kalan randevu (Bugün)', 0),
Stat::make('Toplam randevu (Bugün)', 0),
Stat::make('Tamamlanan randevu (Bugün)',0),
Stat::make('İptal edilen randevu (Bugün)',0),
];
}
second chart on center
protected static ?int $sort = 2;

protected int|string|array $columnSpan = 8;

protected static ?string $heading = 'Son bir ayın istatistiği';

protected static ?string $maxHeight = '370px';


protected function getData(): array
{
return [
'datasets' => [
[
'label' => 'Kontrol edilen danışan sayısı',
'data' => [0, 10, 5, 2, 21, 32, 45, 74, 65, 45, 77, 89],
],
],
'labels' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
];
}

protected function getType(): string
{
return 'bar';
}
protected static ?int $sort = 2;

protected int|string|array $columnSpan = 8;

protected static ?string $heading = 'Son bir ayın istatistiği';

protected static ?string $maxHeight = '370px';


protected function getData(): array
{
return [
'datasets' => [
[
'label' => 'Kontrol edilen danışan sayısı',
'data' => [0, 10, 5, 2, 21, 32, 45, 74, 65, 45, 77, 89],
],
],
'labels' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
];
}

protected function getType(): string
{
return 'bar';
}
third stats in one widget goes down as writes DUMMY
protected static int|null $sort = 3;

protected int | string | array $columnSpan = 4;

public function getColumns(): int
{
return 1;
}

protected function getStats(): array
{
return [
Stat::make('DUMMY', '89')
->description('Bu ayki randevuların tamamlanma oranı')
->descriptionIcon('heroicon-m-arrow-trending-up'),

Stat::make('DUMMY', '21%')
->description('Bu ayki iptal edilen randevuların oranı')
->descriptionIcon('heroicon-m-arrow-trending-down'),

Stat::make('DUMMY', '3:12')
->description('Bu ayki toplam randevu')
->descriptionIcon('heroicon-m-arrow-trending-up'),
];
protected static int|null $sort = 3;

protected int | string | array $columnSpan = 4;

public function getColumns(): int
{
return 1;
}

protected function getStats(): array
{
return [
Stat::make('DUMMY', '89')
->description('Bu ayki randevuların tamamlanma oranı')
->descriptionIcon('heroicon-m-arrow-trending-up'),

Stat::make('DUMMY', '21%')
->description('Bu ayki iptal edilen randevuların oranı')
->descriptionIcon('heroicon-m-arrow-trending-down'),

Stat::make('DUMMY', '3:12')
->description('Bu ayki toplam randevu')
->descriptionIcon('heroicon-m-arrow-trending-up'),
];
3 replies