Chart widget with chart.js plugins
I'm trying to add datalabels plugin for Chart.js. I'm following this steps from the docs: https://filamentphp.com/docs/3.x/widgets/charts#using-custom-chartjs-plugins with no luck. I'm getting an Alpine error. I attached ss from widget and resources/js/filament-chart-js-plugins.js.
I rebuilt assets, cleared browser cache, nothing changes. But if I comment all the code from filament-chart-js-plugins.js the error disappear
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1254207575860445226/image.png)
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1254207576296394762/image.png)
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1254207576690655264/image.png)
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1254207576980324454/image.png)
7 Replies
You also need x-ignore on the ax-load element.
I think
Actually you’re confusing ax-load with x-load
I'm not using custom view, I'm just using a chart widget by default
Should I change that to custom widget (livewire)?
Ah. Sorry, looked custom.
Did you miss the step about registering it with FilamentAsset?
Nope, I've already registered 😦
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1254216815807303720/image.png)
Its a fresh laravel/filament installation btw
That is an unusual error though. I saw something similar the other day with x-sort where it complained about x not being defined without explicitly defining it as x-sort=“” since the browser was setting the attribute itself as x-sort=“x-sort” wonder if something changed recently in alpine.