PHPackages                             peterziv/yii2-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. peterziv/yii2-echarts

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

peterziv/yii2-echarts
=====================

Chart widgets for Yii2

0117PHP

Since Jun 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/peterziv/yii2-echarts)[ Packagist](https://packagist.org/packages/peterziv/yii2-echarts)[ RSS](/packages/peterziv-yii2-echarts/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-echarts
============

[](#yii2-echarts)

This is the Yii2 widgets for echarts. You can use this widget to implement the all charts supported by echarts. Some quick class for Line,Pie and map implement. [![Echarts](https://camo.githubusercontent.com/0ec50ac6b41fe588674f9f84356c48ab3d98dc720d4458d72e446664c534af53/687474703a2f2f656368617274732e62616964752e636f6d2f696d616765732f6c6f676f2e706e67)](https://camo.githubusercontent.com/0ec50ac6b41fe588674f9f84356c48ab3d98dc720d4458d72e446664c534af53/687474703a2f2f656368617274732e62616964752e636f6d2f696d616765732f6c6f676f2e706e67)

You can get detail of echarts from [echarts official website](http://echarts.baidu.com/) :)

安装 (Installation):
------------------

[](#安装-installation)

```
$ composer require "peterziv/yii2-echarts:dev-master"

```

示例 (Demo):
----------

[](#示例-demo)

Pie Chart

```
$pieData = ['n1' => ['value' => 11.1], 'n2' => ['value' => 22.2]];
echo Pie::widget([
    'title'=>'Pie Chart Test',
    'responsive' => true,
    'htmlOptions' => ['style' => 'height: 300px;'],
    'visualMap' => [
    	"show" => false,
    	"min" => 80,
    	"max" => 600
    ],
	'data' => $pieData
]);
```

Line Chart

```
$lineData = ['serie1' => ['value' => [1, 2, 3], 'averageLine' => true, 'maxPoint' => true, 'minPoint' => true], 'serie2' => ['averageLine' => true, 'value' => [3, 6, 9]]];
echo Line::widget([
	'responsive' => true,
	'htmlOptions' => ['style' => 'height: 300px;'],
    'title' => 'Line Chart Test',
    'unit'=>'度',
    'axis'=>['小','中','大'],
    'data'=>$lineData
]);
```

Zero data support

```
$zero =[];
echo Line::widget([
  'htmlOptions' => ['style' => 'height: 300px;'],
  'responsive' => true,
  'title' => 'No Data Test',
  'unit' => '度',
  'axis' => ['小', '中', '大'],
  'data' => $zero
]);
```

Also Support json and custom

```
$theOptions =  '{
	"title": {
		"text": "Json data Support"
	},
	"legend": {
		"data": ["bar1", "bar2"],
		"align": "left"
	},
	"toolbox": {
		"feature": {
			"magicType": {
				"type": ["stack", "tiled"]
			}
		}
	},
    "yAxis":[{"name":"SCORE","type":"value"}],
	"xAxis": {
		"data": ["测试1", "测试2", "测试3", "测试4"],
		"silent": false,
		"splitLine": {
			"show": false
		}
	},
	"series": [{
		"name": "bar1",
		"type": "bar",
		"data": [1, 2, 5, 8]
	}, {
		"name": "bar2",
		"type": "bar",
		"data": [9, 6, 5, 8]
	}]
}';
echo Echarts::widget([
  'options'=>$theOptions,
  'htmlOptions' => ['style' => 'height: 300px;'],
]);
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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

Maintainers

![](https://avatars.githubusercontent.com/u/20460690?v=4)[Peter](/maintainers/peterziv)[@peterziv](https://github.com/peterziv)

---

Top Contributors

[![peterziv](https://avatars.githubusercontent.com/u/20460690?v=4)](https://github.com/peterziv "peterziv (12 commits)")

### Embed Badge

![Health badge](/badges/peterziv-yii2-echarts/health.svg)

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

###  Alternatives

[endclothing/prometheus_client_php

Prometheus instrumentation library for PHP applications.

1511.9M10](/packages/endclothing-prometheus-client-php)[tuupola/base58

Base58 encoder and decoder for arbitrary data

56651.7k25](/packages/tuupola-base58)[skywarth/chaotic-schedule

Randomize scheduled command execution time and date intervals

12263.8k](/packages/skywarth-chaotic-schedule)[mvenghaus/filament-plugin-schedule-monitor

Filament Plugin for Spatie's Schedule Monitor

1556.5k1](/packages/mvenghaus-filament-plugin-schedule-monitor)

PHPackages © 2026

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