2017 © Pedro Peláez
 

yii2-extension yii2-amcharts

amCharts widget for Yii2

image

muvo/yii2-amcharts

amCharts widget for Yii2

  • Tuesday, May 3, 2016
  • by muvo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,349 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 9 % Grown

The README.md

amCharts widget for Yii2 framework

Install

Case #1

~ $ composer require muvo/yii2-amcharts

Case #2

or add this string into require section of your composer.json file:, (*1)

"muvo/yii2-charts" : "*"

then run, (*2)

~ $ composer update

Usage

In your view file you can add chart as regular widget, like:, (*3)

<h1>Age Graph</h1>
<?= \muvo\yii\amcharts\Chart::widget([
    'options' => [ // Here is HTML-parameters of DIV element, which contain chart
        'style' => 'height:120px; width: 320px;',
    ],
    'chart' => [ // Here parameters for AmCharts.makeChart()
        'type' => 'serial',
        'categoryField' => 'name',
        'graphs' => [
            [
                'title' => 'Age',
                'type' => 'column',
                'valueField' => 'age',
                'fillAlphas' => 0.75,
            ],
        ],
        'dataProvider' => [
            [
                'name' => 'Alice',
                'age' => 19,
            ],
            [
                'name' => 'Bob',
                'age' => 21,
            ],
            [
                'name' => 'Claire',
                'age' => 35,
            ],
        ],
    ],
]) ?>

See also

amCharts official API reference, (*4)

Credits

Vladislav Muschinskikh i@unixoid.su © 2016, (*5)

The Versions

03/05 2016

dev-master

9999999-dev

amCharts widget for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Vladislav Muschinskikh

yii2 widget charts amcharts