2017 © Pedro Peláez
 

library phpgc

PHP wrapper class for the Google Chart API

image

sohelrana820/phpgc

PHP wrapper class for the Google Chart API

  • Wednesday, August 19, 2015
  • by sohelrana820
  • Repository
  • 1 Watchers
  • 4 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

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., (*1)

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., (*2)

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., (*3)


$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 for see the full chart list., (*4)

The Versions

19/08 2015

dev-master

9999999-dev http://lib.sohelrana.me/phpgc

PHP wrapper class for the Google Chart API

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Sohel Rana

chart graph google chart gchart google graph google chart api php google chart google chart php