PHPackages                             zilange/yii-echarts - 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. zilange/yii-echarts

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

zilange/yii-echarts
===================

yii1.1 echarts widget baidu

16PHP

Since Oct 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/zilange/yii-echarts)[ Packagist](https://packagist.org/packages/zilange/yii-echarts)[ RSS](/packages/zilange-yii-echarts/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii Echarts Widget

yii-echarts
===========

[](#yii-echarts)

Yii1.1 Echarts百度图表小工具
=====================

[](#yii11-echarts百度图表小工具)

Requirements
------------

[](#requirements)

- Yii 1.1 or above
- PHP 5.4 or above

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

[](#installation)

- Extract the release file under `protected/extensions/`

Usage
-----

[](#usage)

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

[](#to-use-this-widget-you-may-insert-the-following-code-into-a-view-file)

### Array key support

[](#array-key-support)

```
$options = [
    'title' => [
        'text' => '统计图标题',
        'textStyle' => ['color' => '#000000', 'fontSize' => '13'],
        'top' => '0'
    ],
    'tooltip' => ['show' => true, 'trigger' => 'axis'],
    'legend' => [
        'data' => ['统计A','统计B','统计C','统计D','统计E','统计F'],
        'bottom' => '0'
    ],
    'toolbox' => [
        'show' => true,
        'feature' => [
            'dataView' => ['readOnly' => false],
            'magicType' => ['type' => ['line', 'bar']],
            'restore' => [],
            'saveAsImage' => [],
        ]
    ],
    'xAxis' => [
        array(
            'name' => 'x坐标轴',
            'type' => 'category',
            'data' => ["产品A","产品B","产品C","产品D","产品E","产品F"]
        )
    ],
    'yAxis' => [
        [
            'name' => 'y坐标轴',
            'type' => 'value',
            'axisLabel' => ['formatter' => '{value}（件）']
        ]
    ],
    'series' => [
        [
            'name' => '统计A',
            'type' => 'bar',
            'data' => [10, 20, 30, 40, 50, 60]
        ],
        [
            'name' => '统计B',
            'type' => 'bar',
            'data' => [55, 12, 33, 60, 20, 75]
        ],
        [
            'name' => '统计C',
            'type' => 'bar',
            'data' => [5, 65, 25, 12, 12, 55]
        ],
        [
            'name' => '统计D',
            'type' => 'bar',
            'data' => [65, 25, 95, 5, 15, 25]
        ],
        [
            'name' => '统计E',
            'type' => 'bar',
            'data' => [15, 26, 44, 65, 65, 15]
        ],
        [
            'name' => '统计F',
            'type' => 'bar',
            'data' => [8, 95, 105, 115, 125, 135]
        ],
    ],
    'color' => ['#EEAAEE','#7CB5EC','#F7A35C', '#90EE7E', '#7798BF', '#FF0066', '#AAEEEE', '#bda29a','#6e7074', '#546570', '#c4ccd3']
];
$this->widget('ext.yii-echarts.EchartsWidget',[
    'htmlOptions' => ['style' => 'height:400px'],   //注意：必须定义表图div容器的高度，才可以显示表图，否则不显示
    'options' => $options
]);
```

生成的报表图: 可点击右上角的工具栏进行柱状图、折线图的任意切换
--------------------------------

[](#生成的报表图-可点击右上角的工具栏进行柱状图折线图的任意切换)

[![image](https://github.com/zilange/yii-echarts/raw/master/dom/images/echarts.jpg)](https://github.com/zilange/yii-echarts/blob/master/dom/images/echarts.jpg)

说明：具体的参数使用参照  配置项手册

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

---

Top Contributors

[![zilange](https://avatars.githubusercontent.com/u/11453392?v=4)](https://github.com/zilange "zilange (9 commits)")

### Embed Badge

![Health badge](/badges/zilange-yii-echarts/health.svg)

```
[![Health](https://phpackages.com/badges/zilange-yii-echarts/health.svg)](https://phpackages.com/packages/zilange-yii-echarts)
```

###  Alternatives

[kalnoy/illuminate-menu

A menu builder for Laravel using Bootstrap's markup.

2514.3k1](/packages/kalnoy-illuminate-menu)

PHPackages © 2026

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