mrlco / yii2-sparkline
A wrapper for Jquery Sparkline in Yii2
Installs: 255
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/bower-jquery-sparkline: ~2.1.2
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-12-06 08:34:31 UTC
README
A wrapper for Jquery Sparkline in Yii2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist mrlco/yii2-sparkline "*"
or add
"mrlco/yii2-sparkline": "*"
to the require section of your composer.json
file.
Usage
Remember to include the Sparkline.php where ever you need:
use mrlco\sparkline\Sparkline;
And in your view:
<?= \mrlco\sparkline\Sparkline::widget([ 'clientOptions' => [ 'type' => 'bar', 'height' => 20, 'barColor' => '#00a65a', ], 'data' => [90, 80, 90, -70, 61, -83, 63] ]); ?>