simialbi / yii2-widget-chart
Chart implementation of amcharts for yii2 framework
Installs: 3 022
Dependents: 5
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 4
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.3
- ext-json: *
- simialbi/yii2-simialbi-base: >=0.13.1 <1.0 | ^1.0.0
- yiisoft/yii2: ^2.0.13
Requires (Dev)
- phpunit/phpunit: ^9.5.21
- yiisoft/yii2-coding-standards: ~2.0
README
Wrapper for amcharts4 library.
Resources
Installation
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require --prefer-dist "simialbi/yii2-widget-chart"
or add
{ "require": { "simialbi/yii2-widget-chart": "^0.5" } }
to the require
section of your composer.json
Example Usage
<?php /* @var $this yii\web\View */ /* @var $image stdClass */ use simialbi\yii2\chart\widgets\LineChart; $this->title = 'my example'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="my-example"> <?php echo LineChart::widget([ 'data' => [ [ 'country' => 'Lithuania', 'litres' => 501.9 ], [ 'country' => 'Czech Republic', 'litres' => 301.9 ], [ 'country' => 'Ireland', 'litres' => 201.1 ], [ 'country' => 'Germany', 'litres' => 165.8 ], [ 'country' => 'Australia', 'litres' => 139.9 ], [ 'country' => 'Austria', 'litres' => 128.3 ], [ 'country' => 'UK', 'litres' => 99 ], [ 'country' => 'Belgium', 'litres' => 60 ], [ 'country' => 'The Netherlands', 'litres' => 50 ] ] ]); ?> </div>
License
yii2-widget-chart is released under MIT license. See bundled LICENSE for details.