Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gfazioli/morris-php
A PHP model and useful class for Morris.js project
https://github.com/gfazioli/morris-php
chart javascript morris morris-javascript morris-php php
Last synced: about 1 month ago
JSON representation
A PHP model and useful class for Morris.js project
- Host: GitHub
- URL: https://github.com/gfazioli/morris-php
- Owner: gfazioli
- License: bsd-2-clause
- Created: 2014-04-01T11:14:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-31T16:58:22.000Z (almost 8 years ago)
- Last Synced: 2024-10-03T09:41:54.396Z (about 2 months ago)
- Topics: chart, javascript, morris, morris-javascript, morris-php, php
- Language: JavaScript
- Homepage: http://undolog.com
- Size: 43 KB
- Stars: 11
- Watchers: 6
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Morris PHP v0.6.0
[![Latest Stable Version](https://poser.pugx.org/gfazioli/morris-php/version.svg)](https://packagist.org/packages/gfazioli/morris-php) [![Total Downloads](https://poser.pugx.org/gfazioli/morris-php/downloads.svg)](https://packagist.org/packages/gfazioli/morris-php) [![Latest Unstable Version](https://poser.pugx.org/gfazioli/morris-php/v/unstable.svg)](https://packagist.org/packages/gfazioli/morris-php) [![License](https://poser.pugx.org/gfazioli/morris-php/license.svg)](https://packagist.org/packages/gfazioli/morris-php)
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
1. Download Morris Javascript lib from http://morrisjs.github.io/morris.js/
2. Include main `morris.php` php file
3. Include chart base `morris-charts.php` php file
3. Include all or single chart that you like use## Getting Started with Composer
1. Use `composer.json`
## Examples
```php
public function draw()
{
?>
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;
}```