- How do I install LiveCharts in a Laravel application?
- Install the package with Composer using matheusmarnt/livecharts, then run php artisan livecharts:install to publish the config and assets. You then render a chart by defining it in PHP and dropping the livewire:livecharts component into a Blade view with the chart passed as a parameter. If you use the default asset mode, make sure the published JavaScript files exist in public/vendor/livecharts/js, otherwise charts render blank.
- Does LiveCharts support Livewire 3 and Livewire 4?
- Yes. Livewire 3 or 4 is a hard requirement, and the package is built around a single Livewire component that handles mount, hydration and reactive updates. It will not work on Livewire 2 or on a non-Livewire Blade setup with a separate JavaScript build, so confirm your pinned Livewire version before adopting it.
- Which Laravel versions does LiveCharts support?
- The package declares support for Laravel 10, 11, 12 and 13. Versions 11, 12 and 13 are validated in CI, while Laravel 10 is declared at runtime but not covered by the CI matrix, so treat it as an untested path. If you are on Laravel 10, budget time for verification or plan an upgrade first.
- Why are my LiveCharts charts blank with ApexCharts is not defined?
- This almost always means the package assets were not published or are missing from public/vendor/livecharts/js after a deploy. In the default both-engine asset mode, missing files cause a silent failure in the browser console rather than a PHP exception, so panels simply stay empty in staging or production. Add the asset publishing step to your release pipeline and confirm the vendor path is publicly reachable.
- What chart types can I build with LiveCharts?
- LiveCharts ships 18 chart types, including line, bar, area, pie, donut, radar, scatter, bubble, heatmap, range bar, radial bar, polar area, box plot, treemap, candlestick, matrix and sankey. There is also a generic factory for anything the typed builders do not cover. You define all of them through the same fluent PHP API or by extending the Chart class.
- Can I use Chart.js instead of ApexCharts with LiveCharts?
- Yes. ApexCharts and Chart.js both ship as engine adapters behind a shared EngineAdapter contract, so the engine is a configuration choice rather than a rewrite of your chart definitions. You can also register your own adapter with LiveCharts::registerEngine if you need a third rendering library or an internal wrapper.
- Can I use LiveCharts in a Vue, React or Inertia frontend without Livewire?
- No. LiveCharts is a server-side chart definition layer delivered through one Livewire component, so it targets Laravel monoliths that already run Livewire with server-driven dashboard state. Inertia, Vue, React, API-first backends and static report generation are out of scope rather than merely harder, because there is no rendering path without the Livewire component.
- How do charts update reactively in LiveCharts?
- Charts re-render from Livewire component state, so updating a public property that feeds the chart definition refreshes the visualization without writing JavaScript. Polling every few seconds is the simplest approach for dashboards. Realtime broadcasting is optional and pulls in Laravel Echo plus a broker through broadcastOn, which expands your infrastructure scope, so only enable it if polling latency is genuinely unacceptable.
- Can I unit test LiveCharts chart definitions with PHPUnit or Pest?
- Yes. Datasets are value objects created with Dataset::make, and chart builders are plain PHP, so you can assert labels, series and options in ordinary unit tests without a browser. Theme tokens are also typed through TwColor and TwPalette enums instead of magic strings, which keeps assertions stable. Engine output is adapter-specific, so test the definition and the payload rather than the rendered JavaScript.
- Is LiveCharts production-ready, and how is it maintained?
- LiveCharts is MIT licensed, but it is a young package with a single maintainer, few dependents and no LTS or CVE feed, so expect to pin a version and own upgrades yourself. It occupies the presentation layer only, holding no persistence, so the blast radius is contained and you can replace it with raw ApexCharts config or a fork. Before going live, also confirm the livecharts:preview gallery route is not publicly routable in production.