dev-master
9999999-dev http://lib.sohelrana.me/phpgcPHP wrapper class for the Google Chart API
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
PHP wrapper class for the Google Chart API
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)
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)
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)
PHP wrapper class for the Google Chart API
MIT
chart graph google chart gchart google graph google chart api php google chart google chart php