jspaine / cyii
c3.js widget for Yii 2 Framework.
Installs: 29
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 0
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-05-25 14:37:01 UTC
README
Add a c3.js chart to your Yii2 app.
Installation
Run
php composer.phar require --prefer-dist jspaine/cyii "dev-master"
or add
"jspaine/cyii": "dev-master"
to the require section of your composer.json
Use
In your view file:
use jspaine\cyii\CYii; <?= CYii::widget([ 'options' => [ 'data' => [ 'x' => 'x', 'columns' => [ ['x', 30, 50, 100, 230, 300, 310], ['data1', 30, 200, 100, 400, 150, 250], ['data2', 130, 300, 200, 300, 250, 450], ], ] ], 'htmlOptions' => ['id' => 'testchart'], ]); ?>
Options can also be passed as a JSON string.