Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yiier/yii2-chartjs-widget
ChartJs 2 for Yii2 widget
https://github.com/yiier/yii2-chartjs-widget
Last synced: 14 days ago
JSON representation
ChartJs 2 for Yii2 widget
- Host: GitHub
- URL: https://github.com/yiier/yii2-chartjs-widget
- Owner: yiier
- Created: 2016-05-17T07:52:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-04T06:49:00.000Z (over 6 years ago)
- Last Synced: 2024-04-14T05:42:31.655Z (8 months ago)
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ChartJs Widget
==============
[ChartJs 2](http://www.chartjs.org/docs/) for Yii2 widgetInstallation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist yiier/yii2-chartjs-widget "*"
```or add
```
"yiier/yii2-chartjs-widget": "*"
```to the require section of your `composer.json` file.
Usage
-----Once the extension is installed, simply use it in your code by :
```php
= ChartJs::widget([
'type' => 'line',
'options' => [
'height' => 200,
'width' => 600
],
'data' => [
'labels' => ["January", "February", "March", "April", "May", "June", "July"],
'datasets' => [
[
'label'=> '# of Votes',
'data' => [65, 59, 90, 81, 56, 55, 40]
],
[
'label'=> '# of Votes',
'data' => [28, 48, 40, 19, 96, 27, 100]
]
]
]
]);?>
```Credits
----------
[2amigos/yii2-chartjs-widget](https://github.com/2amigos/yii2-chartjs-widget)