F
Filament8mo ago
Vikram

Does anyone know how to add a tooltip for the header section of a chat widget ?

i need the tooltip icon on right end of header. and by hovering it should show tool-tip. i had try using html string for $heading but it only accept string so, can use that method. <?php namespace App\Filament\Widgets; use App\Services\Cache\CacheService; use BezhanSalleh\FilamentShield\Traits\HasWidgetShield; use Filament\Widgets\LineChartWidget; class LetTimeChart extends LineChartWidget { use HasWidgetShield; protected static ?string $heading = 'Average time to let'; protected int | string | array $columnSpan = '45%'; protected static ?string $pollingInterval = null; protected static ?int $sort = 1; protected static ?string $maxHeight = '200px'; protected static ?array $options = [ 'plugins' => [ 'htmlLegend' => [ 'containerID' => 'legend-container', ], 'legend' => [ 'display' => false, 'align' => 'end', ], ], ]; protected function getFilters(): ?array { return []; } protected function getData(): array { $averageLetTime = CacheService::getModelData('getAverageLetTime'); return [ 'datasets' => [ [ 'label' => 'Days', 'data' => $averageLetTime?->pluck('value')->toArray(), 'tension' => 0.2, 'borderColor' => 'rgb(127, 113, 239)', 'backgroundColor' => 'rgb(127, 113, 239)', ], ], 'labels' => $averageLetTime?->pluck('month')->toArray(), ]; } }
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server