machour / yii2-sparkline
Yii2 jQuery Sparkline widget
Installs: 29 014
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/bower-jquery-sparkline: ^2.1@dev
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-12-16 04:06:34 UTC
README
The jQuery sparkline assets and widget for Yii2.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist machour/yii2-sparkline "*"
or add
"machour/yii2-sparkline": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, use the widget this way:
<?= \machour\sparkline\Sparkline::widget([ 'clientOptions' => [ 'type' => 'bar', 'height' => 20, 'barColor' => '#00a65a', ], 'data' => [90, 80, 90, -70, 61, -83, 63] ]); ?>
This would produce the following sparkline:
This documentation is available online