Chart tooltip color is wrong
I have a (line) chart widget and I am setting the background+border color of each datasets.
This works fine for the chart legend and the lines itself. But the tooltip/hover info over the line have the wrong color.
As you can see, the rectangles are both orange filled (with the correct rectangle border colors). This orange color changes, if I change the I change the
protected static string $color = 'primary';
to for example info
. Thats weird and not the right behavior?Solution:Jump to solution
@swthate I have created an issue https://github.com/filamentphp/filament/issues/9462
GitHub
Wrong colors on linechart tooltip · Issue #9462 · filamentphp/filam...
Package filament/filament Package Version v3.0.89 Laravel Version v10.30.1 Livewire Version v3.1.0 PHP Version 8.1.25 Problem description When setting backgroundColor to a linechart dataset, the co...
5 Replies
Have you had any luck with this yet? I've been running into this wall for a while now this afternoon as well!
nope. its probably a bug in filament.
maybe we should fill out an issue for it
Yeah. It feels like
protected static string $color = 'primary';
in Filament\Widgets\ChartWidget
is getting in the way of things.Things might be able to fall in place for chart.js do handle it if that
color
was an "indexable option" as shown here: https://www.chartjs.org/docs/latest/general/options.html#indexable-optionsOptions | Chart.js
Open source HTML5 Charts for your website
Solution
@swthate I have created an issue https://github.com/filamentphp/filament/issues/9462
GitHub
Wrong colors on linechart tooltip · Issue #9462 · filamentphp/filam...
Package filament/filament Package Version v3.0.89 Laravel Version v10.30.1 Livewire Version v3.1.0 PHP Version 8.1.25 Problem description When setting backgroundColor to a linechart dataset, the co...