yiier/yii2-chartjs-widget
最新稳定版本:v1.3
Composer 安装命令:
composer require yiier/yii2-chartjs-widget
包简介
ChartJs 2 for Yii2 widget
README 文档
README
ChartJs 2 for Yii2 widget
Installation
The preferred way to install this extension is through composer.
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 :
<?= 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
统计信息
- 总下载量: 8.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2016-05-17