This commit is contained in:
salam committed 2026-05-23 12:40:14 +02:00
1 parent fbaadcd248
commit b4379efb82
9 files changed
+110 -13

No files matched your search

@@ -5,6 +5,7 @@ namespace App\Filament\Widgets;
use App\Filament\Widgets\Data\HelperMoveingAverage;
use App\Filament\Widgets\Data\HelperStatisticType;
use App\Filament\Widgets\Data\LoadEvents;
use Filament\Support\RawJs;
use Filament\Widgets\ChartWidget;
use Filament\Widgets\Concerns\InteractsWithPageFilters;
@@ -21,6 +22,26 @@ class ChartMovingAverageEvent extends ChartWidget
'legend' => [
'display' => false,
],
'tooltip' => [
'callbacks' => [
'label' => RawJs::make(<<<'JS'
function(context) {
let label = context.dataset.label || '';
if (label) {
label += ': ';
}
if (context.parsed.y !== null) {
label += new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(context.parsed.y);
}
return label;
}
JS),
],
],
],
'interaction' => [
'intersect' => false,
],
];