PHPackages                             imotorbike/gchartphp - 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. imotorbike/gchartphp

ActiveLibrary

imotorbike/gchartphp
====================

PHP Object wrapper for the Google Chart API.

04.7k↓100%1PHP

Since Jun 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/imotorbike/gchartphp)[ Packagist](https://packagist.org/packages/imotorbike/gchartphp)[ RSS](/packages/imotorbike-gchartphp/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Object wrapper for the Google Chart API
===========================================

[](#php-object-wrapper-for-the-google-chart-api)

A simple PHP Object wrapper for the [Google Chart API](http://code.google.com/apis/chart/image_charts.html). Should help anyone who needs to automate the building of the Google Chart url. Supports (almost) all types of charts. Prerequisites
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#a-simple-php-object-wrapper-for-the-google-chart-api-should-help-anyone-who-needs-to-automate-the-building-of-the-google-chart-url-supports-almost-all-types-of-chartsprerequisites)

To use this API, you should have a little PHP experience; a little patience to read the documentation; and a little persistence to keep trying if your first charts don't look as you expect them to.

Project migration
-----------------

[](#project-migration)

This project was migrated from a Google Code project. This project will continue to be mirrored on its [Google Code page](http://code.google.com/p/gchartphp/).

Use the master branch for stable release, the experimental branch for the development release, and the legacy branch for the old release of the wrapper (this branch will not be actively updated).

Pie Chart Example
-----------------

[](#pie-chart-example)

[![](https://camo.githubusercontent.com/3adb7729a40b5c939f910a43b1cf49c607ac64d286e87618fa62a016a7bbaf6b/687474703a2f2f63686172742e617069732e676f6f676c652e636f6d2f63686172743f6368743d70266368733d33353078323030266368643d743a3131322c3331352c36362c3430266368646c3d66697273747c7365636f6e647c74686972647c666f75727468266368636f3d6666333334342c3131666631312c3232616163632c3333333361612663686c3d66697273747c7365636f6e647c74686972647c666f7572746826696d6167652e706e67)](https://camo.githubusercontent.com/3adb7729a40b5c939f910a43b1cf49c607ac64d286e87618fa62a016a7bbaf6b/687474703a2f2f63686172742e617069732e676f6f676c652e636f6d2f63686172743f6368743d70266368733d33353078323030266368643d743a3131322c3331352c36362c3430266368646c3d66697273747c7365636f6e647c74686972647c666f75727468266368636f3d6666333334342c3131666631312c3232616163632c3333333361612663686c3d66697273747c7365636f6e647c74686972647c666f7572746826696d6167652e706e67)

Pie chart using the gPieChart class generated by this code:

```
 $piChart = new gPieChart();
 $piChart->addDataSet(array(112,315,66,40));
 $piChart->setLabels = array("first", "second", "third","fourth");
 $piChart->setLegend(array("first", "second", "third","fourth"));
 $piChart->setColors = array("ff3344", "11ff11", "22aacc", "3333aa");

```

Notes
-----

[](#notes)

- The verion that was first committed to GUTHub is the same that is on Google Code. Future commits will be reserved to GITHub.
- I am pleased with how the code is shaping up. I haven't had much of an opportunity in the past to play with inheritence and polymorphism in PHP.

Change Log
----------

[](#change-log)

20110903 - Fixed encodeData2 bug in gChart.php 20110816 - PEAR branch merged in master. Legacy branch created with the old files

###  Health Score

21

—

LowBetter than 20% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cec2996c4857606d04743de502a0c2355857bece1703ad0e627a85d5851624eb?d=identicon)[imotorbike](/maintainers/imotorbike)

---

Top Contributors

[![imotorbike](https://avatars.githubusercontent.com/u/50321038?v=4)](https://github.com/imotorbike "imotorbike (3 commits)")

### Embed Badge

![Health badge](/badges/imotorbike-gchartphp/health.svg)

```
[![Health](https://phpackages.com/badges/imotorbike-gchartphp/health.svg)](https://phpackages.com/packages/imotorbike-gchartphp)
```

PHPackages © 2026

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