2017 © Pedro Peláez
 

yii2-extension yii2-googlechart

Yii2 Google Chart

image

slavkovrn/yii2-googlechart

Yii2 Google Chart

  • Sunday, July 22, 2018
  • by slavkovrn
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Google Chart for Yii2 Framework

http://yii2.kadastrcard.ru/googlechart, (*1)

The extension uses Google library https://www.gstatic.com/charts/loader.js and makes chart from php array of structure defined., (*2)

Google Chart, (*3)

Installation

Install with composer:, (*4)

composer require slavkovrn/yii2-googlechart

or add, (*5)

"slavkovrn/yii2-googlechart": "*"

to the require section of your composer.json file., (*6)

Set link to extension in your view:, (*7)

use slavkovrn\googlechart\GoogleChartWidget;

$data = [
    'SIN' => [
                number_format(0,5) => sin(0),
                number_format(Pi()/4,5) => sin(Pi()/4),
                number_format(Pi()/2,5) => sin(Pi()/2),
                number_format(Pi()/2+Pi()/4,5) => sin(Pi()/2+Pi()/4),
                number_format(Pi(),5) => sin(Pi()),
                number_format(Pi()+Pi()/4,5) => sin(Pi()+Pi()/4),
                number_format(Pi()+Pi()/2,5) => sin(Pi()+Pi()/2),
                number_format(Pi()+Pi()/2+Pi()/4,5) => sin(Pi()+Pi()/2+Pi()/4),
                number_format(2*Pi(),5) => sin(2*Pi()),
             ],
    'COS' => [
                number_format(0,5) => cos(0),
                number_format(Pi()/4,5) => cos(Pi()/4),
                number_format(Pi()/2,5) => cos(Pi()/2),
                number_format(Pi()/2+Pi()/4,5) => cos(Pi()/2+Pi()/4),
                number_format(Pi(),5) => cos(Pi()),
                number_format(Pi()+Pi()/4,5) => cos(Pi()+Pi()/4),
                number_format(Pi()+Pi()/2,5) => cos(Pi()+Pi()/2),
                number_format(Pi()+Pi()/2+Pi()/4,5) => cos(Pi()+Pi()/2+Pi()/4),
                number_format(2*Pi(),5) => cos(2*Pi()),
             ],
];

echo GoogleChartWidget::widget([
    'id' =>'google-chart',
    'title' => 'Google Chart',
    'style' => 'width:100%',
    'data' => $data,
]);

The Versions

22/07 2018

dev-master

9999999-dev

Yii2 Google Chart

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 yii 2 google chart