-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I tried to put the chart on the lens with width('1/2') or width('1/3'). The chart seem to be too large than the card itself as shown in the picture.
here is my code that I put in the cards
public function cards(Request $request)
{
$PostCountByType = Post::selectRaw('type, count(*) as no_post')->groupBy('type')->orderBy('no_post')->get();
$y = $PostCountByType->pluck('type')->toArray();
$x = $PostCountByType->pluck('no_post')->toArray();
return [
(new NovaApexChart())
->type('donut')
->series($x)
->options([
'labels' => $y,
])->width('1/3'),
(new NovaApexChart())
->type('pie')
->series($x)
->options([
'labels' => $y,
])->width('1/3'),
(new NovaApexChart())
->type('bar')
->series([
new BasicSeries('No of Post',$x),
])
->options([
'labels' => $y,
'title' => ['text' => 'Post Count by Type'],
])->width('1/3'),
];
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

