sohelrana820/phpgc
Composer 安装命令:
composer require sohelrana820/phpgc
包简介
PHP wrapper class for the Google Chart API
关键字:
README 文档
README
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
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
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 for see the full chart list.
统计信息
- 总下载量: 35
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-06