© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
12 replies
BlackShadow

Chart scales ticks

Setup a callback
Solution
@CodeWithDennis Have you tried returning RAwJs instead of php array?
This is working for me .
As mentioned in the docs : https://filamentphp.com/docs/3.x/widgets/charts#setting-chart-configuration-options
use Filament\Support\RawJs;
 
protected function getOptions(): RawJs
{
    return RawJs::make(<<<JS
        {
            scales: {
                y: {
                    ticks: {
                        callback: (value) => '€' + value,
                    },
                },
            },
        }
    JS);
}
use Filament\Support\RawJs;
 
protected function getOptions(): RawJs
{
    return RawJs::make(<<<JS
        {
            scales: {
                y: {
                    ticks: {
                        callback: (value) => '€' + value,
                    },
                },
            },
        }
    JS);
}
Chart widgets - Widgets - Filament
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 Widget - Ticks
FilamentFFilament / ❓┊help
2y ago
chart
FilamentFFilament / ❓┊help
3y ago
Chart widget with chart.js plugins
FilamentFFilament / ❓┊help
2y ago
chart size
FilamentFFilament / ❓┊help
17mo ago