leandrocfe / filament-apex-charts

Apex Charts integration for Filament PHP.
https://filament-apex-charts-demo.leandroferreira.dev.br
MIT License
300 stars 38 forks source link

Formatter Feature in ApexCharts Options #15

Closed KyleWLawrence closed 7 months ago

KyleWLawrence commented 1 year ago

It appears the "formatter" feature (such as for the legend, but used in many places) in the options don't work. Is that intentional and any plans integrating that feature?

leandrocfe commented 1 year ago

It appears the "formatter" feature (such as for the legend, but used in many places) in the options don't work. Is that intentional and any plans integrating that feature?

Hi! Yes, I have plans to include it the next version.

KyleWLawrence commented 1 year ago

You are awesome! Look forward to it :)

fmulassano commented 7 months ago

Hi! I think this is an important implementation... I spent 3 hours before to find this issue... thanks

glennjacobs commented 7 months ago

I've submitted a PR for review which adds this functionality. See #55

If you want to use it now, you can simply put the view in resources/views/vendor/filament-apex-charts/widgets/components/chart.blade.php.

glennjacobs commented 7 months ago

My PR was incorrect. I've taken a different approach, which leaves the view intact and instead updates the distributed JS.

To use before being merged you can copy the built JS file to your public/js/app/components/apexcharts.js.

leandrocfe commented 7 months ago

@KyleWLawrence , @fmulassano , @glennjacobs Could you try the new version please? https://github.com/leandrocfe/filament-apex-charts/tree/3.1.0

Formatter is available here https://github.com/leandrocfe/filament-apex-charts?tab=readme-ov-file#extra-options-and-formatters