{"id":36409597,"url":"https://github.com/mitoteam/jpgraph","last_synced_at":"2026-04-06T06:05:42.531Z","repository":{"id":41972722,"uuid":"448527408","full_name":"mitoteam/jpgraph","owner":"mitoteam","description":"JpGraph library composer package with PHP 8.5 support","archived":false,"fork":false,"pushed_at":"2025-12-08T10:13:29.000Z","size":3748,"stargazers_count":54,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-11T18:26:49.198Z","etag":null,"topics":["composer-package","jpgraph","php"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/mitoteam/jpgraph","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitoteam.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-16T10:57:05.000Z","updated_at":"2026-01-05T21:12:13.000Z","dependencies_parsed_at":"2024-01-29T13:05:51.462Z","dependency_job_id":"499eb3c9-e7a6-40d8-bba5-812756328e0f","html_url":"https://github.com/mitoteam/jpgraph","commit_stats":{"total_commits":57,"total_committers":3,"mean_commits":19.0,"dds":"0.45614035087719296","last_synced_commit":"6e4056545fe4af4f2f014b83cf435277fe3134b6"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/mitoteam/jpgraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitoteam%2Fjpgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitoteam%2Fjpgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitoteam%2Fjpgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitoteam%2Fjpgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitoteam","download_url":"https://codeload.github.com/mitoteam/jpgraph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitoteam%2Fjpgraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31461534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["composer-package","jpgraph","php"],"created_at":"2026-01-11T16:50:48.080Z","updated_at":"2026-04-06T06:05:42.523Z","avatar_url":"https://github.com/mitoteam.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JpGraph library composer package with PHP 8.5 support\n\n[![Packagist Version](https://img.shields.io/packagist/v/mitoteam/jpgraph?include_prereleases\u0026style=flat-square\u0026logo=packagist)](https://packagist.org/packages/mitoteam/jpgraph)\n[![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/mitoteam/jpgraph?style=flat-square\u0026logo=php)](https://github.com/mitoteam/jpgraph)\n[![Packagist Total Downloads](https://img.shields.io/packagist/dt/mitoteam/jpgraph?style=flat-square)](https://packagist.org/packages/mitoteam/jpgraph/stats)\n[![Packagist Monthly Downloads](https://img.shields.io/packagist/dm/mitoteam/jpgraph?style=flat-square)](https://packagist.org/packages/mitoteam/jpgraph/stats)\n\n[![GitHub Version](https://img.shields.io/github/v/release/mitoteam/jpgraph?style=flat-square\u0026logo=github)](https://github.com/mitoteam/jpgraph)\n[![GitHub Release Date](https://img.shields.io/github/release-date/mitoteam/jpgraph?style=flat-square)](https://github.com/mitoteam/jpgraph/releases)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/mitoteam/jpgraph?style=flat-square)\n[![GitHub contributors](https://img.shields.io/github/contributors-anon/mitoteam/jpgraph?style=flat-square)](https://github.com/mitoteam/jpgraph/graphs/contributors)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/mitoteam/jpgraph?style=flat-square)](https://github.com/mitoteam/jpgraph/commits)\n\nJpGraph library version: **4.4.3**\n\nPHP versions support: from 5.5 to **8.5**. [Original notes](https://jpgraph.net/download/manuals/chunkhtml/ch01s05.html) about PHP versions.\n\n\n## Usage with composer\n\nThis package is a helper to load original JpGraph library after declaring it as your dependency in composer.json:\n\n```\ncomposer require mitoteam/jpgraph\n```\n\nThen you can load library from anywhere in your code:\n```php\nuse mitoteam\\jpgraph\\MtJpGraph;\n\n// load library and modules\nMtJpGraph::load();                # not really useful without modules\n//or\nMtJpGraph::load('bar');           # load with single module\n//or\nMtJpGraph::load(['bar', 'line']); # load with several modules\n//or\nMtJpGraph::load(['bar', 'line'], true); # load with several modules in Extended Mode (see below)\n\n//using original JpGraph classes\n$graph = new Graph(200, 300);\n```\n\nYou can call `MtJpGraph::load()` method as many times as you need everywhere in your code. Internally it checks if library or module was already loaded and does not load it another time.\n\n## Usage without composer\n\nDownload latest version archive from [Releases](https://github.com/mitoteam/jpgraph/releases) page and unpack it.\n\n## Version numbers\n\nWe started with version _4.3.5_ as latest available library version in time we started. But we need to make some patches to original library (for example to support latest PHP versions). So we had to switch to own version numbers to be able to release updates.\n\nAt 2022-02-25 we decided to switch to version number **10.0.0** to leave some margin in numbering from original library v4.3.5.\n\nCurrent version numbers:\n\n* **Version 10.x** of this package is the latest version of JpGraph library with php **8.2-8.5** compatibility patches (code in \"main\" branch). Can be loaded in Extended Mode (see below).\n* **Version 4.x** of this package provides latest version of original JpGraph library as-is without any compatibility patches (code in \"original\" branch).\n\nAll changes to the original library can be examined as [difference between **main** and **original** branches](https://github.com/mitoteam/jpgraph/compare/original..main#files_bucket).\n\n## Overriding jpgraph's settings\n\nA lot of original jpgraph's settings are defined as constants in `jpg-config.inc.php` and `jpgraph_ttf.inc.php` files. We wrapped all these constants definitions with `if(!defined())` checks. So you can define them with required values **before** loading MtJpGraph. See [Issue #24](https://github.com/mitoteam/jpgraph/issues/24) for the details.\n\nCode example:\n\n```php\nuse mitoteam\\jpgraph\\MtJpGraph;\n\n//first define required constants\ndefine('CACHE_FILE_GROUP', 'supergroup');\n\n// and then load library and modules\nMtJpGraph::load('bar');\n```\n\n## Extended Mode\n\nWe started with just patches for compatibility with recent PHP versions. Before version 10.3 there were no any changes to original code except adding some typecasting or declaring some class members explicitly.\n\nBut after library was used wider there were some bugs discovered in original code. We aware to change functionality of the original library so **Extended Mode** was introduced in version **10.3.0**. Now you can pass `true` as second argument to `MtJpGraph::load()` method to enable Extended Mode. This will enable several more patches to the original code to overcome some bugs.\n\nExtended Mode is disabled by default, you can enable it explicitly only.\n\n### Custom exception handler\n\njpgraph sets custom exceptions handler internally to be able to draw error message in picture if some exception pops up. It restores old exception handler if any was set after exception processing. This behavior can interfere with some tests runners which are using own exception handlers. For example [phpunit](https://github.com/sebastianbergmann/phpunit) marks tests as _risky_ with message \"Test code or tested code did not remove its own exception handlers\".\n\nIt is possible to disable custom jpgraph's exceptions handler by calling explicitly `MtJpGraph::setSkipExceptionHandler(true);` before first call to `MtJpGraph::load()`. MtJpGraph checks if `PHPUNIT_COMPOSER_INSTALL` constant defined and disables jpgraph's exceptions handler implicitly for phpunit.\n\n**Please note**: this intended to be used in tests context only and should not be used in production mode.\n\n## Links\n\n* Original JpGraph website: https://jpgraph.net\n* Documentation: https://jpgraph.net/doc/\n* Examples: https://jpgraph.net/features/gallery.php\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=mitoteam/jpgraph\u0026type=Date)](https://star-history.com/#mitoteam/jpgraph\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitoteam%2Fjpgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitoteam%2Fjpgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitoteam%2Fjpgraph/lists"}