diff --git a/app/Filament/Widgets/PopularCategoryChart.php b/app/Filament/Widgets/PopularCategoryChart.php deleted file mode 100644 index 9451bb2..0000000 --- a/app/Filament/Widgets/PopularCategoryChart.php +++ /dev/null @@ -1,56 +0,0 @@ - [ - 'x' => [ - 'display' => false, - ], - 'y' => [ - 'display' => false, - ], - ], - ]; - - protected function getData(): array - { - $categories = Category::get()->sortBy('id')->pluck('name'); - - $items = Reserveditem::withTrashed()->with('item')->get()->groupBy('item.category_id')->sortByDesc('item.category_id'); - $itemCategoriesCount = []; - - foreach ($items as $item){ - $itemCategoriesCount[] = count($item); - } - - return [ - 'datasets' => [ - [ - 'label' => __('Reservation Category'), - 'data' => $itemCategoriesCount, - 'backgroundColor' => ["#03045e","#0077b6","#00b4d8","#90e0ef","#caf0f8"], - "hoverOffset" => 4, - ], - ], - 'labels' => $categories, - - ]; - } - - protected function getType(): string - { - return 'pie'; - } -}