PHP code example of leandrocfe / filament-apex-charts
1. Go to this page and download the library: Download leandrocfe/filament-apex-charts library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
leandrocfe / filament-apex-charts example snippets
use Leandrocfe\FilamentApexCharts\FilamentApexChartsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FilamentApexChartsPlugin::make()
]);
}
protected function getContentHeight(): ?int
{
return 300;
}
protected static ?string $footer = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.';
use Illuminate\Contracts\View\View;
protected function getFooter(): string|View
{
return view('custom-footer', ['text' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.']);
}
use Illuminate\Support\HtmlString;
protected function getFooter(): string|View
{
return new HtmlString('<p class="text-danger-500">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>');
}
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\TextInput;
protected function getFormSchema(): array
{
return [
TextInput::make('title')
->default('My Chart'),
DatePicker::make('date_start')
->default('2023-01-01'),
DatePicker::make('date_end')
->default('2023-12-31')
];
}