2017 © Pedro Peláez
 

yii2-extension yii2-amcharts

Yii2 extension for amcharts.com

image

mitrm/yii2-amcharts

Yii2 extension for amcharts.com

  • Wednesday, February 25, 2015
  • by mitrm
  • Repository
  • 2 Watchers
  • 0 Stars
  • 218 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 11 % Grown

The README.md

yii2-amcharts

http://www.amcharts.com/, (*1)

To install, either run, (*2)

$ php composer.phar require --prefer-dist mitrm/yii2-amcharts "dev-master"

or add, (*3)

"mitrm/yii2-amcharts": "dev-master"

Example: Displays a pie, (*4)

$chartConfiguration = [
    'dataProvider' => [
        ['author' => 'Вася', 'title' => 'Васильев Вася', 'count' => 5],
        ['author' => 'Олег', 'title' => 'Васильев Олег', 'count' => 15],

    ],
    'type' => 'pie',
    'legend' => [
        'markerType' => 'circle',
        'position' => 'right',
        'marginRight' => 30,
        'autoMargins' => false,
        'labelWidth' => 310,
        'labelText' => '[[title]]',
        'valueText' => '[[value]] ([[percents]]%)',
        'width' => 390,
    ],
    'maxLabelWidth' => 150,
    'marginLeft' => -100,
    'marginTop' => 0,
    'marginBottom' => 0,
    'labelText' => '[[value]] ([[percents]]%)',
    'valueField' => 'count',
    'titleField' => 'title',
    'descriptionField' => 'author',
    'balloonText' => '[[title]]<br><span style=\'font-size:12px\'><b>[[value]]</b> ([[percents]]%)</span>',
];
echo mitrm\amcharts\AmChart::widget([
    'chartConfiguration' => $chartConfiguration, 
    'options' => ['id' => 'chart_id'],
    'width' => '100%',
    'language' => 'ru',
]);

The Versions

25/02 2015

dev-master

9999999-dev https://github.com/mitrm/yii2-amcharts

Yii2 extension for amcharts.com

  Sources   Download

MIT

The Requires

 

by Mitskevich Ruslan

yii2 charts amcharts