Can you use StatsOverviewWidget in infolist?
Can you use StatsOverviewWidget in infolist?
I managed to render it on my infolist, but how do I get the current model/record to pull out the stats for that model?
Is there a way to display a bar chart with the StatsOverviewWidget?
Solution:Jump to solution
Fair enough, but a ViewRecord is still a page which has widgets and also infolists. They aren’t necessarily mutually exclusive but the page is the livewire component which maintains the record. So both the widget and infolist have access to the same record.
8 Replies
What? Widgets and info lists are 2 separate things.
Why would you have a widget inside an info list.
I want some stats for the user. LTV, Booking count etc.
This is how it looks like now, with hard coded stats. I think that makes sense.
Solution
Fair enough, but a ViewRecord is still a page which has widgets and also infolists. They aren’t necessarily mutually exclusive but the page is the livewire component which maintains the record. So both the widget and infolist have access to the same record.
The page is the main livewire component.
Ah, yes. Thank you. That helped. I didn't pass in the Infolist object to my infolist 🙂
Is there a way to make it a bar chart?
You have to use a chart widget if you want a bar chart. Stat widgets don’t support charts.
Ok, I will do that. Thank you