定制 muvo/yii2-amcharts 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

muvo/yii2-amcharts

Composer 安装命令:

composer require muvo/yii2-amcharts

包简介

amCharts widget for Yii2

README 文档

README

Install

Case #1

~ $ composer require muvo/yii2-amcharts

Case #2

or add this string into require section of your composer.json file:

"muvo/yii2-charts" : "*"

then run

~ $ composer update

Usage

In your view file you can add chart as regular widget, like:

<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

Credits

Vladislav Muschinskikh i@unixoid.su © 2016

统计信息

  • 总下载量: 3.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-04-30