Pie Chart wizard has axes by default

I created a chart widget and for some reason, the pie chart shows x & y axes with gridlines. I don't think I've ever seen a pie chart display this way. Why does it by default display this way and what do I need to do to remove them? I've been googling trying to find something I can pass to the options to turn this off but can't find anything. I just don't understand why I would ever want this for a pie chart. Any suggestions?
namespace App\Filament\Resources\ProjectResource\Widgets;

use App\Models\Project;
use Filament\Widgets\ChartWidget;

class ActiveProjectsByProjMgrChart extends ChartWidget
{
protected static ?string $heading = 'Active Projects by PM';
protected static ?string $pollingInterval = null;

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

protected function getData(): array
{
$data = Project::query()
->join('users', 'users.id', '=', 'projects.project_manager_id')
->selectRaw('users.name, count(projects.id) as active_projects_count')
->groupBy('users.name')
->whereNull('completed_at')
->orderByDesc('active_projects_count')
->get();

$pms = $data->pluck('name')->toArray();
$colors = [];
for ($i = 1; $i <= count($pms); $i++) {
$colors[] = sprintf('#%06X', mt_rand(0, 0xFFFFFF));
}
$counts = $data->pluck('active_projects_count')->toArray();
return [
'datasets' => [
[
'label' => 'Active Projects',
'data' => $counts,
'backgroundColor' => $colors,
'hoverOffset' => 10,
],
],
'labels' => $pms,
];
}

protected function getType(): string
{
return 'pie';
}
}
namespace App\Filament\Resources\ProjectResource\Widgets;

use App\Models\Project;
use Filament\Widgets\ChartWidget;

class ActiveProjectsByProjMgrChart extends ChartWidget
{
protected static ?string $heading = 'Active Projects by PM';
protected static ?string $pollingInterval = null;

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

protected function getData(): array
{
$data = Project::query()
->join('users', 'users.id', '=', 'projects.project_manager_id')
->selectRaw('users.name, count(projects.id) as active_projects_count')
->groupBy('users.name')
->whereNull('completed_at')
->orderByDesc('active_projects_count')
->get();

$pms = $data->pluck('name')->toArray();
$colors = [];
for ($i = 1; $i <= count($pms); $i++) {
$colors[] = sprintf('#%06X', mt_rand(0, 0xFFFFFF));
}
$counts = $data->pluck('active_projects_count')->toArray();
return [
'datasets' => [
[
'label' => 'Active Projects',
'data' => $counts,
'backgroundColor' => $colors,
'hoverOffset' => 10,
],
],
'labels' => $pms,
];
}

protected function getType(): string
{
return 'pie';
}
}
No description
2 Replies