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
No description
No description
No description
7 Replies
awcodes
awcodes2w ago
You also need x-ignore on the ax-load element. I think Actually you’re confusing ax-load with x-load
rogazth
rogazth2w ago
I'm not using custom view, I'm just using a chart widget by default Should I change that to custom widget (livewire)?
awcodes
awcodes2w ago
Ah. Sorry, looked custom. Did you miss the step about registering it with FilamentAsset?
rogazth
rogazth2w ago
Nope, I've already registered 😦
No description
rogazth
rogazth2w ago
Its a fresh laravel/filament installation btw
awcodes
awcodes2w ago
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.