PHPackages                             deryabinsergey/yii2-chartjs - 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. deryabinsergey/yii2-chartjs

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

deryabinsergey/yii2-chartjs
===========================

Yii2 chartjs

0.0.3.1(4y ago)015MITPHPPHP &gt;=5.4.0

Since Apr 27Pushed 4y agoCompare

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

READMEChangelog (1)Dependencies (2)Versions (5)Used By (0)

phpNT - Yii2 Chart JS
=====================

[](#phpnt---yii2-chart-js)

[![Latest Stable Version](https://camo.githubusercontent.com/b98e7a34d334d7b3211b738f7309092aa30f00f724847af29c44378d713ffbf1/68747470733a2f2f706f7365722e707567782e6f72672f7068706e742f796969322d63686172746a732f762f737461626c65)](https://packagist.org/packages/phpnt/yii2-chartjs) [![Total Downloads](https://camo.githubusercontent.com/b509ba072f1054b2036805565371459d533bd6999824bb19de1d859217fe9e7c/68747470733a2f2f706f7365722e707567782e6f72672f7068706e742f796969322d63686172746a732f646f776e6c6f616473)](https://packagist.org/packages/phpnt/yii2-chartjs) [![Latest Unstable Version](https://camo.githubusercontent.com/28b7b1909fbf05a740956e4ac49b84269e08fe78262308c28f59561ce749de7c/68747470733a2f2f706f7365722e707567782e6f72672f7068706e742f796969322d63686172746a732f762f756e737461626c65)](https://packagist.org/packages/phpnt/yii2-chartjs) [![License](https://camo.githubusercontent.com/2e47c99e6a30261139cdc9d7245f6d25640563bc1275cb82550732e69c170e3f/68747470733a2f2f706f7365722e707567782e6f72672f7068706e742f796969322d63686172746a732f6c6963656e7365)](https://packagist.org/packages/phpnt/yii2-chartjs)

### Описание:

[](#описание)

### Yii2 Chart JS - Красивые графики для аналитики

[](#yii2-chart-js---красивые-графики-для-аналитики)

### [DEMO](http://phpnt.com/widget/chartjs)

[](#demo)

---

### - [Поддержать phpNT](http://phpnt.com/donate/index)

[](#--поддержать-phpnt)

---

### Социальные сети:

[](#социальные-сети)

- [Канал YouTube](https://www.youtube.com/c/phpnt)
- [Группа VK](https://vk.com/phpnt)
- [Группа facebook](https://www.facebook.com/Phpnt-595851240515413/)

---

Установка:

---

```
php composer.phar require "phpnt/yii2-chartjs" "*"

```

или

```
composer require phpnt/yii2-chartjs

```

или добавить в composer.json файл

```
"phpnt/yii2-chartjs": "*"

```

### Представление:

[](#представление)

---

```

```

```
// определение данных
$dataWeatherOne = [
    'labels' => ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
    'datasets' => [
        [
            'data' => [-14, -10, -4, 6, 17, 23, 22, 22, 13, 2, -5, -12],
            'label' =>  "Линейный график (tºC Урал).",
            'fill' => false,
            'lineTension' => 0.1,
            'backgroundColor' => "rgba(75,192,192,0.4)",
            'borderColor' => "rgba(75,192,192,1)",
            'borderCapStyle' => 'butt',
            'borderDash' => [],
            'borderDashOffset' => 0.0,
            'borderJoinStyle' => 'miter',
            'pointBorderColor' => "rgba(75,192,192,1)",
            'pointBackgroundColor' => "#fff",
            'pointBorderWidth' => 1,
            'pointHoverRadius' => 5,
            'pointHoverBackgroundColor' => "rgba(75,192,192,1)",
            'pointHoverBorderColor' => "rgba(220,220,220,1)",
            'pointHoverBorderWidth' => 2,
            'pointRadius' => 1,
            'pointHitRadius' => 10,
            'spanGaps' => false,
        ]
    ]
];
$dataWeatherTwo = [
    'labels' => ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь",  "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
    'datasets' => [
        [
            'data' => [-14, -10, -4, 6, 17, 23, 22, 22, 13, 2, -5, -12],
            'label' =>  "График (tºC Урал).",
            'fill' => true,
            'lineTension' => 0.1,
            'backgroundColor' => "rgba(75,192,192,0.4)",
            'borderColor' => "rgba(75,192,192,1)",
            'borderCapStyle' => 'butt',
            'borderDash' => [],
            'borderDashOffset' => 0.0,
            'borderJoinStyle' => 'miter',
            'pointBorderColor' => "rgba(75,192,192,1)",
            'pointBackgroundColor' => "#fff",
            'pointBorderWidth' => 1,
            'pointHoverRadius' => 5,
            'pointHoverBackgroundColor' => "rgba(75,192,192,1)",
            'pointHoverBorderColor' => "rgba(220,220,220,1)",
            'pointHoverBorderWidth' => 2,
            'pointRadius' => 1,
            'pointHitRadius' => 10,
            'spanGaps' => false,
        ],
        [
            'data' => [8, 10, 11, 15, 21, 26, 28, 30, 26, 21, 16, 9],
            'label' =>  "График (tºC Сочи).",
            'fill' => true,
            'lineTension' => 0.1,
            'backgroundColor' => "rgba(255, 234, 0,0.4)",
            'borderColor' => "rgba(255, 234, 0,1)",
            'borderCapStyle' => 'butt',
            'borderDash' => [],
            'borderDashOffset' => 0.0,
            'borderJoinStyle' => 'miter',
            'pointBorderColor' => "rgba(255, 234, 0,1)",
            'pointBackgroundColor' => "#fff",
            'pointBorderWidth' => 1,
            'pointHoverRadius' => 5,
            'pointHoverBackgroundColor' => "rgba(255, 234, 0,1)",
            'pointHoverBorderColor' => "rgba(220,220,220,1)",
            'pointHoverBorderWidth' => 2,
            'pointRadius' => 1,
            'pointHitRadius' => 10,
            'spanGaps' => false,
        ]
    ]
];
$dataScatter = [
    'datasets' => [
        [
            'data' => [
                [
                    'x' => -10,
                    'y' => 0
                ], [
                    'x' => 0,
                    'y' => 10
                ], [
                    'x' => 10,
                    'y' => 5
                ],
            ],
            'label' => 'График рассеивания',
            'fill' => true,
            'lineTension' => 0.1,
            'backgroundColor' => "rgba(75,192,192,0.4)",
            'borderColor' => "rgba(75,192,192,1)",
            'borderCapStyle' => 'butt',
            'borderDash' => [],
            'borderDashOffset' => 0.0,
            'borderJoinStyle' => 'miter',
            'pointBorderColor' => "rgba(75,192,192,1)",
            'pointBackgroundColor' => "#fff",
            'pointBorderWidth' => 1,
            'pointHoverRadius' => 5,
            'pointHoverBackgroundColor' => "rgba(75,192,192,1)",
            'pointHoverBorderColor' => "rgba(220,220,220,1)",
            'pointHoverBorderWidth' => 2,
            'pointRadius' => 1,
            'pointHitRadius' => 10,
            'spanGaps' => false,
        ]
    ]
];
$dataPie = [
    'labels' => [
        "Красный",
        "Синий",
        "Желтый"
    ],
    'datasets' => [
        [
            'data' => [300, 50, 100],
            'backgroundColor' => [
                "#FF6384",
                "#36A2EB",
                "#FFCE56"
            ],
            'hoverBackgroundColor' => [
                "#FF6384",
                "#36A2EB",
                "#FFCE56"
            ]
        ]
    ]
];
$dataBubble = [
    'datasets' => [
        [
            'label' => 'Пузырьковый график',
            'data' => [
                [
                    'x' => 20,
                    'y' => 30,
                    'r' => 15
                ],
                [
                    'x' => 40,
                    'y' => 10,
                    'r' => 10
                ],
            ],
            'backgroundColor' =>"#FF6384",
            'hoverBackgroundColor' => "#FF6384",
        ]
    ]
];
// вывод графиков
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_LINE,
    'data'  => $dataWeatherOne,
    'options'   => []
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_LINE,
    'data'  => $dataWeatherTwo,
    'options'   => []
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_LINE,
    'data'  => $dataScatter,
    'options'   => [
        'scales' => [
            'xAxes' => [[
                'type' => 'linear',
                'position' => 'bottom'
            ]]
        ]
    ]
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_BAR,
    'data'  => $dataWeatherOne,
    'options'   => []
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_BAR,
    'data'  => $dataWeatherTwo,
    'options'   => []
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_RADAR,
    'data'  => $dataWeatherOne,
    'options'   => []
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_RADAR,
    'data'  => $dataWeatherTwo,
    'options'   => []
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_POLAR_AREA,
    'data'  => $dataWeatherOne,
    'options'   => []
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_POLAR_AREA,
    'data'  => $dataWeatherTwo,
    'options'   => []
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_PIE,
    'data'  => $dataPie,
    'options'   => []
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_DOUGHNUT,
    'data'  => $dataPie,
    'options'   => []
]);
echo ChartJs::widget([
    'type'  => ChartJs::TYPE_BUBBLE,
    'data'  => $dataBubble,
    'options'   => []
]);
```

---

Документация (примеры):
=======================

[](#документация-примеры)

[Chart JS](http://www.chartjs.org/)
-----------------------------------

[](#chart-js)

---

### Лицензия:

[](#лицензия)

### [MIT](https://ru.wikipedia.org/wiki/%D0%9B%D0%B8%D1%86%D0%B5%D0%BD%D0%B7%D0%B8%D1%8F_MIT)

[](#mit)

---

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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.

###  Release Activity

Cadence

Every ~613 days

Total

4

Last Release

1463d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7665884?v=4)[Deryabin Sergey](/maintainers/deryabinsergey)[@DeryabinSergey](https://github.com/DeryabinSergey)

---

Top Contributors

[![DeryabinSergey](https://avatars.githubusercontent.com/u/7665884?v=4)](https://github.com/DeryabinSergey "DeryabinSergey (2 commits)")

---

Tags

yii2chartjschart jsphpntyii2 chartjs

### Embed Badge

![Health badge](/badges/deryabinsergey-yii2-chartjs/health.svg)

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

PHPackages © 2026

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