matheusmarnt/livecharts
LiveCharts is a reactive chart abstraction for Laravel using a pure PHP fluent API. Build 18 chart types and render via a single Livewire component. Supports ApexCharts and Chart.js with pluggable engines, enabling easy updates without JS boilerplate.
wire:poll, event listeners) enables real-time updates without manual JavaScript. This is a strong fit for dashboards or data-heavy applications where state changes frequently.@liveChartsScripts). This requires:
@liveChartsScripts before @livewireScripts in layouts..env if preferred.<livewire:livecharts> component is Blade-specific. For non-Blade templates (e.g., Inertia.js), additional adapters or custom components may be needed.php artisan vendor:publish --tag=livecharts-assets). Misconfiguration (e.g., incorrect asset paths) can break rendering.EngineAdapter). This is a niche risk but could delay adoption if custom engines are needed.<html class="dark"> or prefers-color-scheme. Applications using custom dark-mode implementations (e.g., CSS variables) may need additional logic to sync with LiveCharts.wire:poll) or broadcasting may introduce network overhead for high-frequency data changes. Monitor payload sizes and server load under stress.Livewire Adoption:
Asset Strategy:
Chart Complexity:
Dark Mode Support:
Scaling:
Testing:
Maintenance:
<livewire:livecharts> and @liveChartsScripts. Non-Blade projects (e.g., Inertia.js) will require custom components or adapters.TwColor, TwPalette) assumes Tailwind v4. Projects using other CSS frameworks (e.g., Bootstrap) may need to map custom color tokens.Assessment Phase:
Proof of Concept:
composer require matheusmarnt/livecharts).php artisan livecharts:install to publish config/assets.Incremental Rollout:
Deprecation Plan:
Prerequisites:
composer require livewire/livewire).Package Installation:
composer require matheusmarnt/livecharts
php artisan livecharts:install
local, cdn, or both) during installation.php artisan make:chart).Configuration:
config/livecharts.php for global settings (e.g., default engine, asset paths).@liveChartsScripts to the Blade layout (before @livewireScripts).Development:
$chart = LiveCharts::line()->labels(['Jan', 'Feb'])->dataset('Sales', [100, 200]);
Advanced Features:
$chart->poll(5000); // 5-second refresh
$chart->broadcastOn('private-charts.user')->broad
How can I help you explore Laravel packages today?