How to use getFilters in filament charts

Can anyone please direct me on how to implement getFilters to work?
$activeFilter = $this->filter;
protected function getFilters(): ?array
    {
        return [
            'today' => 'Today',
            'week' => 'Last week',
            'month' => 'Last month',
            'year' => 'This year',
        ];
    }
Was this page helpful?