PHPackages                             onmotion/yii2-widget-apexcharts - 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. onmotion/yii2-widget-apexcharts

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

onmotion/yii2-widget-apexcharts
===============================

Yii2 charts widget - wrapper for the ApexCharts.js

v1.0.9(1y ago)1957.6k↓44.7%12[13 PRs](https://github.com/onmotion/yii2-widget-apexcharts/pulls)1MITPHPPHP &gt;=5.5.0

Since Oct 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/onmotion/yii2-widget-apexcharts)[ Packagist](https://packagist.org/packages/onmotion/yii2-widget-apexcharts)[ RSS](/packages/onmotion-yii2-widget-apexcharts/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (23)Used By (1)

Yii2 charts widget
==================

[](#yii2-charts-widget)

Yii2 charts widget - wrapper for the [ApexCharts.js](https://apexcharts.com).

[![Latest Stable Version](https://camo.githubusercontent.com/4fa957bbc7d91cc3b051bd8c66a2035fa0a599d8a30c49efac8695aa526ba4e0/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6d6f74696f6e2f796969322d7769646765742d617065786368617274732f762f737461626c65)](https://packagist.org/packages/onmotion/yii2-widget-apexcharts)[![Total Downloads](https://camo.githubusercontent.com/d888efe87cbc4182b29be25ae89b644db790ce28a1db87a6b34a3dd6dc35ba1d/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6d6f74696f6e2f796969322d7769646765742d617065786368617274732f646f776e6c6f616473)](https://packagist.org/packages/onmotion/yii2-widget-apexcharts)[![Monthly Downloads](https://camo.githubusercontent.com/fdf7d2939b28da10018a8fa7412e8a8fe5c85924e6a73c34c9b001a121b37180/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6d6f74696f6e2f796969322d7769646765742d617065786368617274732f642f6d6f6e74686c79)](https://packagist.org/packages/onmotion/yii2-widget-apexcharts)[![License](https://camo.githubusercontent.com/7d05ced227d75ef4331b690b78cd0737793d6df1d2790d3cb2c78fd923da919b/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6d6f74696f6e2f796969322d7769646765742d617065786368617274732f6c6963656e7365)](https://packagist.org/packages/onmotion/yii2-widget-apexcharts)

[![fluent](https://raw.githubusercontent.com/onmotion/yii2-widget-apexcharts/docs/docs/apexexample.gif)](https://raw.githubusercontent.com/onmotion/yii2-widget-apexcharts/docs/docs/apexexample.gif)[![fluent](https://raw.githubusercontent.com/onmotion/yii2-widget-apexcharts/docs/docs/apexexample2.gif)](https://raw.githubusercontent.com/onmotion/yii2-widget-apexcharts/docs/docs/apexexample2.gif)

For more examples see [ApexCharts.js demos](https://apexcharts.com/javascript-chart-demos/)

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

[](#installation)

Just run:

```
composer require onmotion/yii2-widget-apexcharts

```

or add

```
"onmotion/yii2-widget-apexcharts": "*"

```

to the require section of your composer.json file.

Usage
-----

[](#usage)

Add `echo \onmotion\apexcharts\ApexchartsWidget::widget([])`with necessary options in the view file.

Options
-------

[](#options)

Optiontypedefaultdescription**timeout**int`500`Timeout before widget appearance**type**string`area`Chart type. [More](https://apexcharts.com/docs/options/chart/type/)**width**string`100%`Chart width**height**string`350`Chart height**chartOptions**array[detail](https://apexcharts.com/docs/options/)**series**array[detail](https://apexcharts.com/docs/series/)Examples
--------

[](#examples)

```
$series = [
    [
        'name' => 'Entity 1',
        'data' => [
            ['2018-10-04', 4.66],
            ['2018-10-05', 5.0],
        ],
    ],
    [
        'name' => 'Entity 2',
        'data' => [
            ['2018-10-04', 3.88],
            ['2018-10-05', 3.77],
        ],
    ],
    [
        'name' => 'Entity 3',
        'data' => [
            ['2018-10-04', 4.40],
            ['2018-10-05', 5.0],
        ],
    ],
    [
        'name' => 'Entity 4',
        'data' => [
            ['2018-10-04', 4.5],
            ['2018-10-05', 4.18],
        ],
    ],
];

echo \onmotion\apexcharts\ApexchartsWidget::widget([
    'type' => 'bar', // default area
    'height' => '400', // default 350
    'width' => '500', // default 100%
    'chartOptions' => [
        'chart' => [
            'toolbar' => [
                'show' => true,
                'autoSelected' => 'zoom'
            ],
        ],
        'xaxis' => [
            'type' => 'datetime',
            // 'categories' => $categories,
        ],
        'plotOptions' => [
            'bar' => [
                'horizontal' => false,
                'endingShape' => 'rounded'
            ],
        ],
        'dataLabels' => [
            'enabled' => false
        ],
        'stroke' => [
            'show' => true,
            'colors' => ['transparent']
        ],
        'legend' => [
            'verticalAlign' => 'bottom',
            'horizontalAlign' => 'left',
        ],
    ],
    'series' => $series
]);
```

[![fluent](https://raw.githubusercontent.com/onmotion/yii2-widget-apexcharts/docs/docs/example.png)](https://raw.githubusercontent.com/onmotion/yii2-widget-apexcharts/docs/docs/example.png)

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 76.9% 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 ~264 days

Recently: every ~459 days

Total

9

Last Release

664d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e5407caa213f6975f2d554a7a9d62a443c96b3c7b854fb71622479017ee227b?d=identicon)[onmotion](/maintainers/onmotion)

---

Top Contributors

[![onmotion](https://avatars.githubusercontent.com/u/12899080?v=4)](https://github.com/onmotion "onmotion (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![kvishsky](https://avatars.githubusercontent.com/u/7858563?v=4)](https://github.com/kvishsky "kvishsky (1 commits)")[![rizort](https://avatars.githubusercontent.com/u/10337012?v=4)](https://github.com/rizort "rizort (1 commits)")

---

Tags

apexchartschartshacktoberfestwrapperyii2yii2-charts-widgetyii2-extensionyii2extensionwidgetchartdiagramchartsapexcharts

### Embed Badge

![Health badge](/badges/onmotion-yii2-widget-apexcharts/health.svg)

```
[![Health](https://phpackages.com/badges/onmotion-yii2-widget-apexcharts/health.svg)](https://phpackages.com/packages/onmotion-yii2-widget-apexcharts)
```

###  Alternatives

[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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