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/.

Add @liveChartsScripts before @livewireScripts. The LiveCharts JS runtime registers an Alpine component and must load before Livewire’s bundled Alpine initializes:

<body>
<!-- your chart components here -->
@liveChartsScripts
@livewireScripts
</body>

This directive injects the required charting engine scripts (CDN or local) and the Alpine.js integration bundle.