PHPackages                             ipmedia/google-chart-wrapper - 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. ipmedia/google-chart-wrapper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ipmedia/google-chart-wrapper
============================

A PHP wrapper on top of http://chart.apis.google.com/chart

1.0.0(9y ago)022PHP

Since Aug 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ipMediaDevs/GoogleChartWrapper)[ Packagist](https://packagist.org/packages/ipmedia/google-chart-wrapper)[ RSS](/packages/ipmedia-google-chart-wrapper/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

GoogleChartWrapper
==================

[](#googlechartwrapper)

[![Build Status](https://camo.githubusercontent.com/1ff0b94defb619d6319d53806b6cb6bdfd01d89df403a25d901999a52b4ddb64/68747470733a2f2f7472617669732d63692e6f72672f69704d65646961446576732f476f6f676c654368617274577261707065722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ipMediaDevs/GoogleChartWrapper)

Introduction
------------

[](#introduction)

GoogleChartWrapper is a quick clean api over the [Google Image Chart Service](https://developers.google.com/chart/image/).

> **Warning:** This API is deprecated.

Although the API is deprecated and it can be turned off without notice, its still a great choice when you have to quickly generate chats for email reports. Feel free to imporove it as you like.

Instalation
-----------

[](#instalation)

```
composer require ipmedia/google-chart-wrapper
```

Usage
-----

[](#usage)

```
use \IpMedia\GoogleChartWrapper;

// instantiate wrapper
$wrapper = new GoogleChartWrapper;

// set the data to be rendered
$wrapper->setData([ 5, 2, 3 ]);

// render the link to the google api generator
$wrapper->getSrc();  // http://chart.apis.google.com/chart?cht=p3&chs=450x200&chd=t:5,2,3

// change the type of the chart
$wrapper->setType(GoogleChartWrapper::PIE)->getSrc();  // http://chart.apis.google.com/chart?cht=p&chs=450x200&chd=t:5,2,3

// set the size of the chart
$wrapper->setSize(200, 200)->$this->getSrc();  // http://chart.apis.google.com/chart?cht=p3&chs=200x200&chd=t:5,2,3

// set the base color
$wrapper->setBaseColor('00ffff')->getSrc(); // http://chart.apis.google.com/chart?cht=p3&chs=450x200&chd=t:5,2,3&chco=00ffff
// rgb supported
$wrapper->setBaseColor([ 0, 255, 255 ])->getSrc(); // http://chart.apis.google.com/chart?cht=p3&chs=450x200&chd=t:5,2,3&chco=00ffff

// set the base color
$wrapper->setGradientColor([ 0, 0, 0 ], [ 255, 255, 255 ])->getSrc(); // http://chart.apis.google.com/chart?cht=p3&chs=450x200&chd=t:5,2,3&chco=000000,ffffff

// or set a color for each segment
$this->setColors([ [ 255, 0, 0 ], [ 0, 255, 0 ], [ 0, 0, 255 ] ])->getSrc(); // http://chart.apis.google.com/chart?cht=p3&chs=450x200&chd=t:5,2,3&chco=ff0000|00ff00|0000ff

// add labels
$wrapper->setLabels([ 'Five', 'Two', 'Four' ])->getSrc();  // http://chart.apis.google.com/chart?cht=p3&chs=450x200&chd=t:5,2,3&chl=Five|Two|Four

// and finally you can set the labels of the chart
$wrapper->setTitle('Chart Title')->getSrc();  // http://chart.apis.google.com/chart?cht=p3&chs=450x200&chd=t:5,2,3&chtt=Chart+Title
```

License
-------

[](#license)

GoogleChartWrapper is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3610d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3576577?v=4)[Catalin](/maintainers/capir)[@capir](https://github.com/capir)

---

Top Contributors

[![capir](https://avatars.githubusercontent.com/u/3576577?v=4)](https://github.com/capir "capir (12 commits)")

### Embed Badge

![Health badge](/badges/ipmedia-google-chart-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/ipmedia-google-chart-wrapper/health.svg)](https://phpackages.com/packages/ipmedia-google-chart-wrapper)
```

###  Alternatives

[ttree/eelshell

A shell for EEL expressions

178.5k](/packages/ttree-eelshell)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
