F
Filamentโ€ข3w ago
Samir

Change background color of my widgets

What I am trying to do: I have widgets where i'm trying to add colors thresholds For example on the 1st screen, i'd like to have red colored background between 0 and 2.5, orange between 2.5 and 4 and red if more than 4 What I did: Creating a thresholdbackground.js in resources>js adding it to vite.config.js adding to my widget the function getChartConfiguration() php artisan optimize:clear run npm build My issue/the error: no error but colors not appearing Code: (code in screenshots) PS: i'm new to laravel, been learning to code since 3 months but i rely heavily on chatgpt for this type of custom implementation Thanks in advance ๐Ÿ™‚
No description
No description
No description
No description
2 Replies
awcodes
awcodesโ€ข3w ago
Is this even possible in chart js which is the underlying package? I donโ€™t know that it is.
Samir
SamirOPโ€ข3w ago
I'm not sure :/ I'm gonna dig chart.js doc and maybe try to modify the line color instead

Did you find this page helpful?