larawire-garage/larapex-livewire
A Livewire wrapper for ApexCharts that lets Laravel developers build reactive, dynamic charts entirely in PHP. Bind chart data to Livewire component state and watch visualizations update automatically as your data changes, with no JavaScript required.
Architecture fit. Unchanged in substance: the package remains a thin PHP/Blade adapter over ApexCharts, with rendering delegated to the upstream JS library and reactivity delegated to Livewire. The v2.0.0 theme feature sits directly on the seam we identified as the risk — ApexCharts themes are applied via updateOptions/constructor options, so a Light/Dark toggle implies either a re-instantiation of the chart instance or a client-side updateOptions call driven from Livewire state. That is precisely the imperative-JS-versus-DOM-morph boundary where these wrappers usually break, so the new feature increases the amount of lifecycle glue the package owns rather than reducing it.
Integration feasibility. Still straightforward mechanically — Composer install, publish assets/config, drop in a component — but the version story just got worse, not better. The jump from v0.0.2 to v2.0.0 skips the entire 1.x line, and the changelog for that jump lists exactly one item (theme support) plus a single community PR (#3). Either the maintainer retroactively adopted semver, or there are breaking changes that were never written down. Both readings are concerning for a dependency we would pin in a production composer.json. Confirm the actual diff (compare/v0.0.2...v2.0.0) before assuming the upgrade is additive.
Technical risk. High, and marginally higher than before. A major-version bump whose notes describe a feature addition is a documentation smell; we cannot tell from the release whether component namespaces, config keys, or the Blade/Livewire API changed. The theme feature itself introduces new risk: theme state now has to survive Livewire morphs, wire:navigate, and polling without flickering, without rendering a light chart on a dark page, and without duplicating instances on toggle. It also implies an opinion about how theming is detected (Tailwind dark class, prefers-color-scheme, or an explicit package config) that must match our design system. Upstream ApexCharts and Livewire majors remain the dominant tail risks.
Key questions. What actually changed between v0.0.2 and v2.0.0 — is there a breaking-change list or migration guide, or is the bump cosmetic? Is the theme reactive to a Livewire property, or set once at mount? Does it read the Tailwind dark class, prefers-color-scheme, or a package config value? Does a theme switch re-instantiate the chart (flicker, animation reset, lost zoom/selection state) or call updateOptions in place? Does theme state survive wire:navigate and polling refreshes? Can we override theme colours per-chart for brand tokens? Is there any test coverage for the theme path, and does the package now declare a Livewire/Laravel compatibility matrix? Has the ApexCharts pin moved?
Stack fit. Unchanged. Strong for Laravel + Livewire dashboards needing ApexCharts' superior handling of mixed chart types, annotations, and tooltips; poor for Inertia/Vue/React, where a native ApexCharts wrapper remains the safer call. The addition of first-party theme support is a modest plus for any product that already ships a dark mode, since it removes one piece of custom @script plumbing — but only if it maps onto our existing theme strategy rather than imposing its own.
Migration path. New precondition: treat v0.0.2 → v2.0.0 as a potentially breaking upgrade and diff it before adopting. For teams already on v0.0.2, budget a half-day to read the diff, run the theme path, and confirm no API surface moved. For teams hand-rolling ApexCharts in Blade + Alpine, migration is still a mechanical refactor of config into PHP properties, and the theme feature now removes one more reason to hand-roll. Migrating from another charting library remains a per-screen rewrite, not a swap.
Compatibility. Must be verified against the pinned Livewire and Laravel versions in the estate, and now also against our theming implementation. The absence of a published compatibility matrix, combined with a two-release history and a major-version jump, means assume narrow support until a spike proves otherwise.
Sequencing. (1) Diff v0.0.2...v2.0.0 and classify the change as breaking or additive. (2) Version-matrix spike in a scratch app against our pinned Livewire/Laravel. (3) Theme spike: wire the package's Light/Dark support to our actual design tokens and toggle mechanism, and measure flicker, duplicate canvases, and state loss on toggle. (4) Build one production-representative chart with live updates (polling + model binding) to re-validate lifecycle behaviour, since the theme path touches it. (5) Audit asset bundling and CSP implications; decide bundle vs CDN. (6) Pin an exact version and wrap the package in an internal shared chart component so the vendor boundary stays one file deep and remains swappable.
Maintenance. Unchanged and still the headline concern: bus factor of one, 4 stars, 0 dependents, and a PR history of a single external contribution (#3). The v0.0.2 → v2.0.0 jump with a one-line changelog is evidence for the pessimistic case — version numbers are not communicating change, so we must read diffs rather than release notes. Budget for owning the glue layer (roughly 200–500 LOC) if the maintainer goes quiet; the theme feature adds to that surface, not just to the package's value. MIT licensing keeps forking legally trivial; the cost is engineering attention.
Support. GitHub issues only, with uncertain response times; a single-contributor PR merged into a major release suggests limited review depth. Internal documentation, a tested reference component, and a written note on how we map themes to our design tokens become the real support surface. Do not plan on upstream SLA, and do not plan on upstream migration guides for major versions.
Scaling. PHP-side data prep remains cheap. The concerns are unchanged — JSON payload size per Livewire round-trip (large series × frequent polls) and client-side chart instance churn — with one addition: theme switching now potentially forces a chart re-render, so a toggle-heavy UI (or a per-request theme recalculation) multiplies instance churn. Favour server-side aggregation and coarse polling intervals; keep theme resolution a pure client-side concern where possible rather than part of the Livewire payload.
Failure modes. Unchanged set — stale chart instance after morph, duplicated canvases, memory leaks on navigation, broken tooltips after $refresh, hard failures on Livewire/ApexCharts upgrades — plus theme-specific modes: light chart rendered on a dark page (flash of incorrect theme on first paint or after wire:navigate), chart retaining the old palette after a toggle until the next full refresh, lost zoom/selection state on theme change, and duplicate instances when toggled rapidly. Each needs a case in our internal test harness; vendor coverage cannot be assumed, particularly for the theme path.
Ramp-up. Still low for anyone fluent in Livewire and ApexCharts options — roughly one engineer-day to productive use — plus the spike above. The theme feature slightly lowers the cost of shipping a dark-mode dashboard but slightly raises the cost of understanding the package's lifecycle behaviour, since there is now more glue to reason about. A chart-config abstraction we own remains advisable so that both the chart options and the theme mapping are ours, and the package is one file deep and disposable.
How can I help you explore Laravel packages today?