{"id":18685439,"url":"https://github.com/wpbones/morris-php","last_synced_at":"2026-03-16T14:39:23.071Z","repository":{"id":57082142,"uuid":"71701622","full_name":"wpbones/morris-php","owner":"wpbones","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-24T16:49:34.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T11:12:31.067Z","etag":null,"topics":["charting-library","charts","morris","morris-javascript","morris-php","wordpress","wp-bones","wp-bones-packages"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpbones.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-23T12:33:02.000Z","updated_at":"2024-10-24T16:49:39.000Z","dependencies_parsed_at":"2024-04-09T17:39:59.313Z","dependency_job_id":"5e6cce96-6648-495d-b7e6-8f3915805c6b","html_url":"https://github.com/wpbones/morris-php","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"e20f8c60820e009f59a722fdcdc1cbb4ff9b20e3"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbones%2Fmorris-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbones%2Fmorris-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbones%2Fmorris-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbones%2Fmorris-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpbones","download_url":"https://codeload.github.com/wpbones/morris-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248517383,"owners_count":21117442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["charting-library","charts","morris","morris-javascript","morris-php","wordpress","wp-bones","wp-bones-packages"],"created_at":"2024-11-07T10:22:33.170Z","updated_at":"2025-09-15T18:26:39.499Z","avatar_url":"https://github.com/wpbones.png","language":"PHP","readme":"# MorrisJS PHP version for WP Bones\n\n\u003cdiv align=\"center\"\u003e\n\n[![Latest Stable Version](https://poser.pugx.org/wpbones/morris-php/v/stable?style=for-the-badge)](https://packagist.org/packages/wpbones/morris-php) \u0026nbsp;\n[![Latest Unstable Version](https://poser.pugx.org/wpbones/morris-php/v/unstable?style=for-the-badge)](https://packagist.org/packages/wpbones/morris-php) \u0026nbsp;\n[![Total Downloads](https://poser.pugx.org/wpbones/morris-php/downloads?style=for-the-badge)](https://packagist.org/packages/wpbones/morris-php) \u0026nbsp;\n[![License](https://poser.pugx.org/wpbones/morris-php/license?style=for-the-badge)](https://packagist.org/packages/wpbones/morris-php) \u0026nbsp;\n[![Monthly Downloads](https://poser.pugx.org/wpbones/morris-php/d/monthly?style=for-the-badge)](https://packagist.org/packages/wpbones/morris-php)\n\n\u003c/div\u003e\n\nThis package provides a simple way to use the [MorrisJS](https://morrisjs.github.io/morris.js/) library in your WordPress plugin.\n\n![MorrisJS PHP version for WP Bones](https://github.com/user-attachments/assets/194a457a-f48e-41f5-bcd7-8676b5506457)\n\n## Requirements\n\nThis package works with a WordPress plugin written with [WP Bones framework library](https://github.com/wpbones/WPBones).\n\n\n## Installation\n\nYou can install third party packages by using:\n\n```sh copy\nphp bones require wpbones/morris-php\n```\n\nI advise to use this command instead of `composer require` because doing this an automatic renaming will done.\n\nYou can use composer to install this package:\n\n```sh copy\ncomposer require wpbones/morris-php\n```\n\nYou may also to add `\"wpbones/morris-php\": \"~0.7\"` in the `composer.json` file of your plugin:\n\n```json copy filename=\"composer.json\" {4}\n  \"require\": {\n    \"php\": \"\u003e=7.4.0\",\n    \"wpbones/wpbones\": \"~1.5\",\n    \"wpbones/morris-php\": \"~1.1\"\n  },\n```\n\nand run\n\n```sh copy\ncomposer install\n```\n\n## Enqueue for Controller\n\nYou can use the provider to enqueue the styles.\n\n\n```php copy\nuse WPKirk\\Http\\Controllers\\Controller;\nuse WPKirk\\MorrisPHP\\Morris;\n\nclass MorrisPHPController extends Controller\n{\n  public function index()\n  {\n\n    Morris::enqueue();\n\n    return WPKirk()\n      -\u003eview('packages.morris-php.index')\n      -\u003ewithAdminStyle('prism')\n      -\u003ewithAdminScript('prism')\n      -\u003ewithAdminStyle('wp-kirk-common');\n  }\n}\n```\n\nIn your view:\n\n```php copy filename=\"your_view.php\" copy\n\u003cdiv id=\"morris-area\"\u003e\u003c/div\u003e\n\n\u003c?php\n\necho Morris::area( 'morris-area' )\n           -\u003exkey( [ 'y' ] )\n           -\u003eykeys( [ 'a', 'b' ] )\n           -\u003elabels( [ 'Series A', 'Series B' ] )\n           -\u003ehoverCallback( 'function(index, options, content){var row = options.data[index];return \"sin(\" + row.x + \") = \" + row.y;}' )\n           -\u003edata( [\n                     [ \"y\" =\u003e '2006', \"a\" =\u003e 100, \"b\" =\u003e 90 ],\n                     [ \"y\" =\u003e '2007', \"a\" =\u003e 75, \"b\" =\u003e 65 ],\n                     [ \"y\" =\u003e '2008', \"a\" =\u003e 50, \"b\" =\u003e 40 ],\n                     [ \"y\" =\u003e '2009', \"a\" =\u003e 75, \"b\" =\u003e 65 ],\n                     [ \"y\" =\u003e '2010', \"a\" =\u003e 50, \"b\" =\u003e 40 ],\n                     [ \"y\" =\u003e '2011', \"a\" =\u003e 75, \"b\" =\u003e 65 ],\n                     [ \"y\" =\u003e '2012', \"a\" =\u003e 100, \"b\" =\u003e 90 ]\n                   ] );\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpbones%2Fmorris-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpbones%2Fmorris-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpbones%2Fmorris-php/lists"}