leandrocfe/filament-apex-charts
Pros:
HasFiltersSchema trait).getOptions(), extraJsOptions(), and updatedInteractsWithSchemas().deferLoading and pollingInterval address common pain points (e.g., slow queries, real-time updates).Cons:
getOptions() for data fetching (e.g., no built-in ORM query builder like Laravel Scout or Echo).panel() method in AppServiceProvider or Panel configuration.make:filament-apex-charts) scaffolds boilerplate, reducing manual setup.getOptions().pollingInterval configuration or Livewire event listeners.| Risk Area | Severity | Mitigation |
|---|---|---|
| Filament Version Mismatch | Medium | Pin exact Filament version in composer.json (e.g., ^5.0). |
| ApexCharts Breaking Changes | Low | Monitor ApexCharts releases and update package accordingly. |
| Performance Bloat | Medium | Lazy-load charts with deferLoading; use pollingInterval=null for static data. |
| Data Fetching Bottlenecks | High | Implement caching (e.g., Laravel Cache) or queue slow queries. |
| Customization Complexity | Low | Leverage extraJsOptions() for JS-specific tweaks; use Filament’s modify() for UI adjustments. |
Data Source Strategy:
getOptions() implementation and performance.Real-Time Requirements:
pollingInterval or Livewire events be configured?pollingInterval or custom event listeners.Styling Consistency:
getOptions().Scalability:
deferLoading) and data aggregation.Testing Coverage:
Primary Use Case: Ideal for Filament-based admin panels requiring interactive, visually rich dashboards (e.g., analytics, monitoring, reporting).
Compatibility:
4.0.0 for v4).Non-Filament Projects:
filament-apex-charts as a reference for manual ApexCharts + Laravel integration.Assessment Phase:
Installation:
composer require leandrocfe/filament-apex-charts:"^5.0"
AppServiceProvider or Panel configuration:
FilamentApexChartsPlugin::make()
Widget Migration:
php artisan make:filament-apex-charts [WidgetName]
getOptions() (e.g., replace legacy Chart.js configs with ApexCharts syntax).Testing:
Optimization:
deferLoading for slow queries.pollingInterval for real-time updates.php artisan vendor:publish --tag="filament-apex-charts-views"
| Feature | Compatibility |
|---|---|
| Filament v5 | ✅ Native support. |
| Filament v4/v3/v2 | ✅ Via tagged branches (e.g., 4.0.0 for v4). |
| Laravel 10–12 | ✅ Supported. |
| Dark Mode | ✅ Built-in (configurable via $darkMode or theme option). |
| Livewire | ✅ Supported for real-time updates. |
| Custom Data Sources | ✅ Any data source (Eloquent, API, raw arrays) via getOptions(). |
| CSS Frameworks | ⚠️ May require overrides for Tailwind/Bootstrap conflicts. |
| Server-Side Rendering | ❌ JS-dependent; not SSR-friendly (use static charts for SSR). |
Phase 1: Core Integration (1–2 days)
pollingInterval).Phase 2: Dynamic Features (1–3 days)
HasFiltersSchema), real-time updates (pollingInterval), and custom data logic.Phase 3: Optimization (0.5–1 day)
deferLoading for slow queries.Phase 4: Rollout (0.5 day)
Pros:
Cons:
How can I help you explore Laravel packages today?