PHPackages                             skeeks/yii2-widget-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. skeeks/yii2-widget-highcharts

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

skeeks/yii2-widget-highcharts
=============================

Highcharts widget for Yii 2 Framework.

1.0.3(11y ago)130.6k↓50%2BSD 3-ClauseJavaScript

Since Oct 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/skeeks-semenov/yii2-widget-highcharts)[ Packagist](https://packagist.org/packages/skeeks/yii2-widget-highcharts)[ Docs](http://www.skeeks.com/)[ RSS](/packages/skeeks-yii2-widget-highcharts/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (6)Used By (2)

Yii2 Highcharts Widget
======================

[](#yii2-highcharts-widget)

Easily add [Highcharts, Highstock and Highmaps](http://www.highcharts.com/) graphs to your Yii2 application.

[![Screen Shot](https://camo.githubusercontent.com/4580f4c9af1be21de8530a782ebe6907794653705aad96d0aae6f7b467a3fef2/687474703a2f2f7777772e7969696672616d65776f726b2e636f6d2f657874656e73696f6e2f796969322d686967686368617274732d7769646765742f66696c65732f73637265656e73686f742e706e67)](https://camo.githubusercontent.com/4580f4c9af1be21de8530a782ebe6907794653705aad96d0aae6f7b467a3fef2/687474703a2f2f7777772e7969696672616d65776f726b2e636f6d2f657874656e73696f6e2f796969322d686967686368617274732d7769646765742f66696c65732f73637265656e73686f742e706e67)

About
-----

[](#about)

### Highcharts

[](#highcharts)

> Create interactive charts easily for your web projects. Used by tens of thousands of developers and 59 out of the world's 100 largest companies, Highcharts is the simplest yet most flexible charting API on the market.

### Highstock

[](#highstock)

> Highstock lets you create stock or general timeline charts in pure JavaScript. Including sophisticated navigation options like a small navigator series, preset date ranges, date picker, scrolling and panning.

### Highmaps

[](#highmaps)

> Build interactive maps to display sales, election results or any other information linked to geography. Perfect for standalone use or in dashboards in combination with Highcharts!

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist skeeks/yii2-widget-highcharts "dev-master"

```

or add

```
"skeeks/yii2-widget-highcharts": "dev-master"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

### Preferred Method (using PHP arrays)

[](#preferred-method-using-php-arrays)

To use this widget, insert the following code into a view file:

```
use skeeks\widget\highcharts\Highcharts;

echo Highcharts::widget([
   'options' => [
      'title' => ['text' => 'Fruit Consumption'],
      'xAxis' => [
         'categories' => ['Apples', 'Bananas', 'Oranges']
      ],
      'yAxis' => [
         'title' => ['text' => 'Fruit eaten']
      ],
      'series' => [
         ['name' => 'Jane', 'data' => [1, 0, 4]],
         ['name' => 'John', 'data' => [5, 7, 3]]
      ]
   ]
]);
```

By configuring the `options` property, you can specify the options that need to be passed to the Highcharts JavaScript object. Please refer to the demo gallery and documentation on the [Highcharts website](http://www.highcharts.com/) for possible options.

See [/doc/examples](https://github.com/miloschuman/yii2-highcharts/tree/master/doc/examples) for more usage examples.

### Alternative Method (using JSON string)

[](#alternative-method-using-json-string)

Alternatively, you can use a valid JSON string in place of an associative array to specify options:

```
Highcharts::widget([
   'options'=>'{
      "title": { "text": "Fruit Consumption" },
      "xAxis": {
         "categories": ["Apples", "Bananas", "Oranges"]
      },
      "yAxis": {
         "title": { "text": "Fruit eaten" }
      },
      "series": [
         { "name": "Jane", "data": [1, 0, 4] },
         { "name": "John", "data": [5, 7,3] }
      ]
   }'
]);
```

*Note:* You must provide a *valid* JSON string (with double quotes) when using the second option. You can quickly validate your JSON string online using [JSONLint](http://jsonlint.com/).

### Just the Assets

[](#just-the-assets)

If you merely want to include the Highcharts/Highstock/Highmaps javascript libraries in your view, you can bypass the widget and access the asset bundle directly:

```
use skeeks\widget\highcharts\HighchartsAsset;

HighchartsAsset::register($this)->withScripts(['highstock', 'modules/exporting', 'modules/drilldown']);
```

In this scenario, you would need to write and include your own JavaScript to display the charts, just as illustrated in the [Highcharts Demo](http://www.highcharts.com/demo), [Highstock Demo](http://www.highcharts.com/stock/demo) and [Highmaps Demo](http://www.highcharts.com/maps/demo) pages.

Tips
----

[](#tips)

- If you need to use JavaScript in any of your configuration options, use Yii's \[\[JsExpression\]\] object. For instance:

    ```
    ...
    'tooltip' => [
       'formatter' => new JsExpression('function(){ return this.series.name; }')
    ],
    ...
    ```

    Note, this is currently only possible when using a PHP associative array ([Preferred Method](#preferred-method-using-php-arrays)) for configuration.
- Highcharts by default displays a small credits label in the lower right corner of the chart. This can be removed using the following top-level option.

    ```
    ...
    'credits' => ['enabled' => false],
    ...
    ```
- All adapters, modules, themes, and supplementary chart types must be enabled through the top-level 'scripts' option.

    ```
    ...
    'scripts' => [
       'highcharts-more',   // enables supplementary chart types (gauge, arearange, columnrange, etc.)
       'modules/exporting', // adds Exporting button/menu to chart
       'themes/grid'        // applies global 'grid' theme to all charts
    ],
    ...
    ```

    For a list of available scripts, see the contents of `vendor/skeeks/yii2-widget-highcharts/assets/`.

> [![skeeks!](https://camo.githubusercontent.com/cae82dcf01ec5dead3fe52f7d6dc919d52b7b060cdaccddb39a7a4c3383a282f/68747470733a2f2f67726176617461722e636f6d2f75736572696d6167652f37343433313133322f31336430346438333231383539333536343432323737306236313665353632322e6a7067)](http://www.skeeks.com)
> *Web development has never been so fun!*
> [www.skeeks.com](http://www.skeeks.com)

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~48 days

Total

4

Last Release

4068d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/785306737dd13e3ea6826dfc04ab29ececa88f560d054ff595d64853cb878219?d=identicon)[skeeks-semenov](/maintainers/skeeks-semenov)

---

Top Contributors

[![skeeks-semenov](https://avatars.githubusercontent.com/u/9209305?v=4)](https://github.com/skeeks-semenov "skeeks-semenov (3 commits)")

---

Tags

yii2extensionwidgethighchartshighstockhighmaps

### Embed Badge

![Health badge](/badges/skeeks-yii2-widget-highcharts/health.svg)

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

###  Alternatives

[miloschuman/yii2-highcharts-widget

Highcharts widget for Yii 2 Framework.

1761.5M14](/packages/miloschuman-yii2-highcharts-widget)[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)
