PHPackages                             vnuswilliams/larapex-charts - 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. vnuswilliams/larapex-charts

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

vnuswilliams/larapex-charts
===========================

Package to provide easy api to build apex charts on Laravel

v3.0(2w ago)018MITPHPPHP ^8.3

Since May 20Pushed 2w agoCompare

[ Source](https://github.com/vnuswilliams/larapex-charts)[ Packagist](https://packagist.org/packages/vnuswilliams/larapex-charts)[ Docs](https://larapex-charts.netlify.app/)[ RSS](/packages/vnuswilliams-larapex-charts/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

Larapex Charts
==============

[](#larapex-charts)

[![MadeWithLaravel.com shield](https://camo.githubusercontent.com/83d4e693a18b08c17348fd07819bb4befd3613683298d1cec54a4a3752077160/68747470733a2f2f6d616465776974686c61726176656c2e636f6d2f73746f726167652f7265706f2d736869656c64732f323137352d736869656c642e737667)](https://madewithlaravel.com/p/larapex-charts/shield-link)

[![Latest Stable Version](https://camo.githubusercontent.com/4791811665be12ed563fddfa9cd434880f1c2187f2938520e7edfd27e7629548/68747470733a2f2f706f7365722e707567782e6f72672f617269656c6d656a69616465762f6c6172617065782d6368617274732f762f737461626c65)](https://packagist.org/packages/arielmejiadev/larapex-charts)

[![Total Downloads](https://camo.githubusercontent.com/3622b1e0518e004ba468222d0176fb9876f310a9a3f24c09902f588b432ff666/68747470733a2f2f706f7365722e707567782e6f72672f617269656c6d656a69616465762f6c6172617065782d6368617274732f646f776e6c6f616473)](https://packagist.org/packages/arielmejiadev/larapex-charts)

[![GitHub Actions](https://github.com/arielmejiadev/larapex-charts/actions/workflows/main.yml/badge.svg)](https://github.com/arielmejiadev/larapex-charts/actions/workflows/main.yml/badge.svg)

[![License](https://camo.githubusercontent.com/6a9a43f266f3d2d003b70f1d122eef8de84663de6c707bf7fd0909386d04910e/68747470733a2f2f706f7365722e707567782e6f72672f617269656c6d656a69616465762f6c6172617065782d6368617274732f6c6963656e7365)](https://packagist.org/packages/arielmejiadev/larapex-charts)

A Laravel wrapper for apex charts library Check the documentation on: [Larapex Chart Docs](https://larapex-charts.netlify.app/).

This repository is inspired by [ArielMejiaDev/larapex-charts](https://github.com/ArielMejiaDev/larapex-charts) and gives full credit to the original project.

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

[](#installation)

Install the Laravel package with Composer:

```
composer require vnuswilliams/larapex-charts
```

You can also install ApexCharts in your frontend bundle (optional):

```
npm install apexcharts --save
```

Then import it in your `app.js` (or any other frontend entry file):

```
import ApexCharts from 'apexcharts'
window.ApexCharts = ApexCharts
```

This npm/Vite setup is optional if you prefer using the CDN, or if ApexCharts is already available in your project.

Usage
-----

[](#usage)

### Basic example

[](#basic-example)

In your controller add:

```
$chart = (new LarapexChart)->setTitle('Posts')
                   ->setDataset([150, 120])
                   ->setLabels(['Published', 'No Published']);
```

Remember to import the Facade to your controller with

```
use vnusWilliams\LarapexCharts\Facades\LarapexChart;
```

Or importing the LarapexChart class:

```
use vnusWilliams\LarapexCharts\LarapexChart;
```

Then in your view (Blade file) add:

```

     Chart Sample

     {!! $chart->container() !!}

     {{ $chart->script() }}

```

`$chart->script()` first uses `window.ApexCharts` (useful when ApexCharts is loaded via npm/Vite), and automatically falls back to the CDN only if ApexCharts is not already available globally.

### Livewire support (v2 &amp; v3)

[](#livewire-support-v2--v3)

If you render charts inside Livewire components (including conditional rendering/tabs/selectors), keep using the same API:

```
{!! $chart->container() !!}
```

Then place the global script directive once in your main layout (before ``):

```
@larapexChartScripts
```

The directive now automatically:

- initializes all charts found in the page,
- re-initializes charts after Livewire DOM updates,
- destroys stale chart instances when elements disappear,
- keeps working normally in non-Livewire projects.

Optional: if you update data from Livewire and need a full page chart refresh, emit:

```
$this->dispatch('larapex:refresh'); // Livewire v3
```

or

```
$this->emit('larapex:refresh'); // Livewire v2
```

### More complex example

[](#more-complex-example)

```
$chart = (new LarapexChart)->setType('area')
        ->setTitle('Total Users Monthly')
        ->setSubtitle('From January to March')
        ->setXAxis([
            'Jan', 'Feb', 'Mar'
        ])
        ->setDataset([
            [
                'name'  =>  'Active Users',
                'data'  =>  [250, 700, 1200]
            ]
        ]);
```

You can create a variety of charts including: Line, Area, Bar, Horizontal Bar, Heatmap, pie, donut and Radialbar.

More examples
-------------

[](#more-examples)

Check the documentation on: [Larapex Chart Docs](https://larapex-charts.netlify.app/)

Contributing
------------

[](#contributing)

The author Ariel Mejia Dev.

License
-------

[](#license)

[MIT](./LICENSE.md)

Support the project
-------------------

[](#support-the-project)

Hey 👋 thanks for considering making a donation, with these donations I can continue working to contribute to opensource projects.

[ ![](https://camo.githubusercontent.com/9005c0d063376d1a17bfcc48dcebb28150c668c4b0615cc02398934d7b20f3cc/68747470733a2f2f696d672e6275796d6561636f666665652e636f6d2f627574746f6e2d6170692f3f746578743d427579206d65206120636f6666656526656d6f6a693d26736c75673d617269656c6d656a696164657626627574746f6e5f636f6c6f75723d46463546354626666f6e745f636f6c6f75723d66666666666626666f6e745f66616d696c793d436f6f6b6965266f75746c696e655f636f6c6f75723d30303030303026636f666665655f636f6c6f75723d464644443030)](https://www.buymeacoffee.com/arielmejiadev)Roadmap for future versions
---------------------------

[](#roadmap-for-future-versions)

- Add blade directive `@apexchartscdn`
- Add blade directive `@script($chart)`
- Add a chain options setter for charts
- Update Github Actions to run tests
- Update the package in general for more efficient &amp; modern practices (spatie skeleton package)
- Add ReactJS + Inertia Support
- Add More complex charts
- Add More complex boilerplate code using Laravel/Prompts
- Add more complex boilerplate code examples using Laravel Trends Package

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance96

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

18d ago

Major Versions

v1.0 → v2.02026-05-22

v2.0 → v3.02026-05-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb95d945953ad8dee968c72eafece2596b0887a2b4301a14103e068de017b73b?d=identicon)[Vnus](/maintainers/Vnus)

---

Top Contributors

[![ArielMejiaDev](https://avatars.githubusercontent.com/u/31971074?v=4)](https://github.com/ArielMejiaDev "ArielMejiaDev (72 commits)")[![vnuswilliams](https://avatars.githubusercontent.com/u/106296680?v=4)](https://github.com/vnuswilliams "vnuswilliams (11 commits)")[![pandigresik](https://avatars.githubusercontent.com/u/1853475?v=4)](https://github.com/pandigresik "pandigresik (3 commits)")[![jeffreyvanhees](https://avatars.githubusercontent.com/u/8754630?v=4)](https://github.com/jeffreyvanhees "jeffreyvanhees (2 commits)")[![jamesmills](https://avatars.githubusercontent.com/u/557096?v=4)](https://github.com/jamesmills "jamesmills (2 commits)")[![marineusde](https://avatars.githubusercontent.com/u/105713989?v=4)](https://github.com/marineusde "marineusde (2 commits)")[![sushantaryal](https://avatars.githubusercontent.com/u/8115655?v=4)](https://github.com/sushantaryal "sushantaryal (1 commits)")[![Tschucki](https://avatars.githubusercontent.com/u/43211841?v=4)](https://github.com/Tschucki "Tschucki (1 commits)")[![umairparacha00](https://avatars.githubusercontent.com/u/64344369?v=4)](https://github.com/umairparacha00 "umairparacha00 (1 commits)")[![chimit](https://avatars.githubusercontent.com/u/839349?v=4)](https://github.com/chimit "chimit (1 commits)")[![bensonarafat](https://avatars.githubusercontent.com/u/12992332?v=4)](https://github.com/bensonarafat "bensonarafat (1 commits)")[![dandoingdev](https://avatars.githubusercontent.com/u/3135215?v=4)](https://github.com/dandoingdev "dandoingdev (1 commits)")[![hesami](https://avatars.githubusercontent.com/u/17120377?v=4)](https://github.com/hesami "hesami (1 commits)")[![ManukMinasyan](https://avatars.githubusercontent.com/u/2556185?v=4)](https://github.com/ManukMinasyan "ManukMinasyan (1 commits)")

---

Tags

chartsapexchartslarapexvnusWilliams

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vnuswilliams-larapex-charts/health.svg)

```
[![Health](https://phpackages.com/badges/vnuswilliams-larapex-charts/health.svg)](https://phpackages.com/packages/vnuswilliams-larapex-charts)
```

###  Alternatives

[arielmejiadev/larapex-charts

Package to provide easy api to build apex charts on Laravel

304473.0k](/packages/arielmejiadev-larapex-charts)[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[akaunting/laravel-apexcharts

ApexCharts package for Laravel

84316.7k3](/packages/akaunting-laravel-apexcharts)[marineusde/larapex-charts

Package to provide easy api to build apex charts on Laravel

1218.9k](/packages/marineusde-larapex-charts)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
