Change chart type according to the selected filter
in my chart widget i'm using this code to change the chart type according to the selected filter but it doesnt work,
any idea ?
protected function getType(): string
{
return $this->filter == 'date' ? 'line' : 'bar';
}
2 Replies
This is not enough information to debug this. How do you use this function?
I did it using apexcharts plugin
https://youtu.be/eflnz2w61cA?si=cC3IkYhz1jj5QC9b&t=1885
Filament Brasil
YouTube
Filament ApexCharts - Parte 1 #filamentphp #laravel #livewire
Neste vídeo, Parte 1, vamos explorar a criação de gráficos no dashboard do Painel utilizando o plugin ApexCharts.
O ApexCharts é uma biblioteca poderosa e versátil para a criação de gráficos interativos e dinâmicos.
Com o plugin Filament ApexCharts, é possível gerar gráficos no formato de widgets diretamente no painel. Esses widgets podem ser i...