Error while generating chart widgets

Hey everyone, I'm here becasue an issue. I'm currently trying out Filament. But i encounter an issue with the chart widgets.
livewire.js?id=5d8beb2e:1196 Uncaught TypeError: s.data.datasets.forEach is not a function
livewire.js?id=5d8beb2e:1196 Uncaught TypeError: s.data.datasets.forEach is not a function
` I've tried all the steps documented in the Read before posting topic. But can't seem to fix the issue. can someone help me out. (here is the gist of my widget class) https://gist.github.com/Tjoosten/4036ce7d0d6a0d9e0a795689a7fac566
Gist
LeaseReservationChart.php
GitHub Gist: instantly share code, notes, and snippets.
Solution:
actually 'datasets' => [ [...] ] ```php 'datasets' => [ [...
Jump to solution
3 Replies
Solution
LeandroFerreira
LeandroFerreira8mo ago
actually 'datasets' => [ [...] ]
'datasets' => [
[
'label' => trans('Huurders'),
'data' => $trendData->map(fn (TrendValue $value) => $value->aggregate),
'fill' => 'start'
],
],
'datasets' => [
[
'label' => trans('Huurders'),
'data' => $trendData->map(fn (TrendValue $value) => $value->aggregate),
'fill' => 'start'
],
],
Topairy
TopairyOP8mo ago
I see Thanks but can i ask another question?
LeandroFerreira
LeandroFerreira8mo ago
Yes. You can also open a new topic
Want results from more Discord servers?
Add your server