PHPackages                             bernskioldmedia/laravel-highcharts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bernskioldmedia/laravel-highcharts

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bernskioldmedia/laravel-highcharts
==================================

A Laravel and Livewire wrapper for Highcharts.

0.4.0(2mo ago)145921MITPHPPHP ^8.2CI passing

Since Dec 28Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/bernskiold/laravel-highcharts)[ Packagist](https://packagist.org/packages/bernskioldmedia/laravel-highcharts)[ Docs](https://github.com/bernskioldmedia/laravel-highcharts)[ RSS](/packages/bernskioldmedia-laravel-highcharts/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (4)Dependencies (14)Versions (9)Used By (1)

A Laravel and Livewire implementation of Highcharts.
====================================================

[](#a-laravel-and-livewire-implementation-of-highcharts)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0209e40982de3038b0171802a93f252f7ffd918f8638f3ab251cfb194b0cfd7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6265726e736b696f6c646d656469612f6c61726176656c2d686967686368617274732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bernskioldmedia/laravel-highcharts)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d06fec32a609966978789e067c42d231ad996a622c5ca760d0332fdd95585700/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6265726e736b696f6c646d656469612f6c61726176656c2d686967686368617274732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/bernskioldmedia/laravel-highcharts/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/36908734fc902ac22f4a5f23ce87bc436d55a71f2f0629f02b397b5c5873bd96/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6265726e736b696f6c646d656469612f6c61726176656c2d686967686368617274732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bernskioldmedia/laravel-highcharts)

Prerequisites
-------------

[](#prerequisites)

- Laravel 10 or higher
- PHP 8.2 or higher
- Highcharts, available on `window.Highcharts`.
- Livewire 2 or higher

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require bernskioldmedia/laravel-highcharts
```

After installing the package you need to import the Alpine JS component which is used to display the chart. You can do this by adding the following to your `resources/app.js` file:

```
import Chart from '../../vendor/bernskioldmedia/laravel-highcharts/resources/js/chart';

Alpine.data('highchartsChart', Chart); // Note that the Alpine component is expected to be named 'highchartsChart'.
```

If you are using Livewire 3, you need to [manually bundle AlpineJS](https://livewire.laravel.com/docs/installation#manually-bundling-livewire-and-alpine) per the Livewire documentation. Your `resources/app.js` file should then look like this:

```
import {Livewire, Alpine} from '../../vendor/livewire/livewire/dist/livewire.esm';
import Chart from '../../vendor/bernskioldmedia/laravel-highcharts/resources/js/chart';

Alpine.data('highchartsChart', Chart); // Note that the Alpine component is expected to be named 'highchartsChart'.

Livewire.start();
```

### Publishing config and views

[](#publishing-config-and-views)

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-highcharts-config"
```

This is the contents of the published config file:

```
