Skip to content

Installation

Install the package via composer:

Terminal window
composer require matheusmarnt/livecharts

Run the installation command to publish the configuration and essential assets:

Terminal window
php artisan livecharts:install

This publishes config/livecharts.php and copies the pre-built JS bundles to public/vendor/livecharts/js/.

Since v2.7.7, no layout changes are needed for most apps. LiveCharts uses the navigate asset strategy by default: each chart component emits its engine scripts via Livewire’s @assets block, which Livewire loads once per page and re-ensures across wire:navigate SPA transitions.

<body>
<!-- chart components self-contain their scripts -->
@livewireScripts
</body>

If you need the legacy push-stack behavior (e.g. non-Livewire contexts or manual placement), set LIVECHARTS_ASSETS_STRATEGY=stack in .env and add @liveChartsScripts before @livewireScripts:

LIVECHARTS_ASSETS_STRATEGY=stack
<body>
@liveChartsScripts
@livewireScripts
</body>

See Asset Management for the full strategy reference.