PHPackages                             fruppel/yii2-googlecharts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fruppel/yii2-googlecharts

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

fruppel/yii2-googlecharts
=========================

Google Charts widget for Yii2.

v1.2.0(5y ago)873.1k↓34.6%5[1 issues](https://github.com/fruppel/yii2-googlecharts/issues)BSD-3-ClausePHP

Since Oct 31Pushed 5y ago3 watchersCompare

[ Source](https://github.com/fruppel/yii2-googlecharts)[ Packagist](https://packagist.org/packages/fruppel/yii2-googlecharts)[ RSS](/packages/fruppel-yii2-googlecharts/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Google Charts widget for Yii2
=============================

[](#google-charts-widget-for-yii2)

A wrapper for Google's charts API (see ) to use it with Yii2.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

```
composer require fruppel/yii2-googlecharts

```

Usage
-----

[](#usage)

Example 1: 3D PieChart with data in DataTable format

[![demo](https://cloud.githubusercontent.com/assets/3985601/4497539/fb54bd70-4a6f-11e4-89a3-7c96c9fd9f0e.jpg)](https://cloud.githubusercontent.com/assets/3985601/4497539/fb54bd70-4a6f-11e4-89a3-7c96c9fd9f0e.jpg)

```

```

Example 2: AreaChart with data array (will be converted to DataTable)

[![demo2](https://cloud.githubusercontent.com/assets/3985601/4530310/b1ce75fc-4d7f-11e4-923f-79500c7df15b.jpg)](https://cloud.githubusercontent.com/assets/3985601/4530310/b1ce75fc-4d7f-11e4-923f-79500c7df15b.jpg)

```

```

Render charts as png image
--------------------------

[](#render-charts-as-png-image)

Set the $asPng option to true like the example below

```
