PHPackages                             sohelrana820/phpgc - 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. sohelrana820/phpgc

ActiveLibrary

sohelrana820/phpgc
==================

PHP wrapper class for the Google Chart API

635PHP

Since Aug 19Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

phpgc
=====

[](#phpgc)

phpgc is the PHP wrapper class which provides a flexible way to build chart. phpgc is using Google Chart api to draw chart. This is actually working as wrapper of google chart api. With this phpgc you can easily visualise your data into your web application.

Installation
============

[](#installation)

Write `"sohelrana820/phpgc": "dev-master"` in your composer.json file to install. If you want to manual install then download this repository and store somewhere in your project.

Usage
=====

[](#usage)

Create a instance of phpgc class `$chart = new \src\phpgc();` Now you can create chart by using this $chart object. Here I am showing example code for creating a pie chart.

```
$pieColumns = array(
    'Country' => array(
        'type' => 'string',
        'label' => 'Name of Country'
    ),
    'Population' => array(
        'type' => 'number',
        'label' => 'Population'
    )
);

$pieRows = array(
    array(
        0 => 'Germany',
        1 => 100000,
    ),
    array(
        0 => 'United States',
        1 => 120000,
    ),
    array(
        0 => 'Brazil',
        1 => 80000,
    ),
    array(
        0 => 'Canada',
        1 => 70000,
    ),
    array(
        0 => 'France',
        1 => 50000,
    ),
    array(
        0 => 'BD',
        1 => 100000,
    ),
    array(
        0 => 'RU',
        1 => 90000,
    ),
);
$pieOptions = array(
    'title' => 'Population',
    'width' => 'autometic',
    'height' => '250',
    'widget' => true,
    'class' => 'custom',
    'div' => 'pie_chart_1',
);
echo $chart->pieChart($pieColumns, $pieRows, $pieOptions);
```

Please [click here](http://lib.sohelrana.me/phpgc) for see the full chart list.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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/9846f348ccee3eb40907333d692e493fbde3b003f7da733bbff5d32e087b0700?d=identicon)[sohelrana820](/maintainers/sohelrana820)

---

Top Contributors

[![sohelrana820](https://avatars.githubusercontent.com/u/2820810?v=4)](https://github.com/sohelrana820 "sohelrana820 (13 commits)")

### Embed Badge

![Health badge](/badges/sohelrana820-phpgc/health.svg)

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

PHPackages © 2026

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