© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
6 replies
Chimpy

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.
LeaseReservationChart.php
Solution
actually
'datasets' => [ [...] ]
'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'
    ],
],
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Chart widgets same height
FilamentFFilament / ❓┊help
2y ago
Umami Widgets Plugin - Error 'Undefined array key "t"' while using chart widget:
FilamentFFilament / ❓┊help
11mo ago
Custom plugins for the Chart Widgets
FilamentFFilament / ❓┊help
3y ago
How to write test for chart widgets or do we need to test chart widgets
FilamentFFilament / ❓┊help
2y ago