Line Chart not displayed caused by Alpine Error Exception
Hi there,
I am following the official tutorial on drawing charts (https://filamentphp.com/docs/3.x/widgets/charts).
I am using the Trend package as suggested to use Eloquent models.
I have an
OrdersChart
Class. It is very simple and follows the tutorial structure.
I included it in the AdminPanelProvider::widgets()
array parameter.
What doesn't work?
The line chart is not displayed.
What exceptions do I see?
I have tried to console log the s.data.datasets
in the function td(s, t)
the charts.js file to ensure I am not running crazy.
It would be great if someone could point me in a direction so I can see my mistake.Solution:Jump to solution
Ok got it solved. An additional array bracket was missing! 🤦
```php
'datasets' => [
[ // <--- this one!!!
'label' => 'Bestellungen',...
1 Reply
Solution
Ok got it solved. An additional array bracket was missing! 🤦