gfazioli/morris-php
最新稳定版本:0.6.0
Composer 安装命令:
composer require gfazioli/morris-php
包简介
PHP helper classes for morris.js
README 文档
README
This project is a PHP part for Morris.js ( http://morrisjs.github.io/morris.js/ ).
You can use this PHP class to wrap the Morris Javascript class
Getting Started
- Download Morris Javascript lib from http://morrisjs.github.io/morris.js/
- Include main
morris.phpphp file - Include chart base
morris-charts.phpphp file - Include all or single chart that you like use
Getting Started with Composer
- Use
composer.json
Examples
public function draw() { ?> <div id="my-charts"></div> <?php $morris = new Line( 'my-charts' ); $morris->xkey = array( 'date' ); $morris->ykeys = array( 'value' ); $morris->labels = array( 'Money' ); $morris->data = array( array( 'date' => '2010', 'value' => 88 ), array( 'date' => '2011', 'value' => 18 ), array( 'date' => '2012', 'value' => 28 ), array( 'date' => '2013', 'value' => 48 ), ); echo $morris; }
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-11-06