Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Jpgraph Laravel Package

mitoteam/jpgraph

Composer wrapper for JpGraph 4.4.3 with PHP 5.5–8.5 support. Install via composer and call MtJpGraph::load() to autoload the JpGraph core and modules (bar, line, etc.), with optional Extended Mode, then use standard JpGraph classes like Graph.

View on GitHub
Deep Wiki
Context7

JpGraph library composer package with PHP 8.5 support

Frequently asked questions about Jpgraph
How do I install and use mitoteam/jpgraph in a Laravel project?
Install via Composer with `composer require mitoteam/jpgraph`, then load JpGraph and modules anywhere in your code using `MtJpGraph::load(['bar', 'line'])` or `MtJpGraph::load('pie')`. The package preserves the original JpGraph API, so existing code works unchanged.
Does this package work with Laravel 11 and PHP 8.5?
Yes, the package supports PHP 8.5, which aligns with Laravel 11’s long-term support. Test with `strict_types=1` in your `php.ini` to avoid deprecation warnings in Extended Mode.
Can I load only specific JpGraph modules (e.g., 'bar' or 'line')?
Absolutely. Use `MtJpGraph::load(['bar'])` or `MtJpGraph::load(['line'])` to load only the modules you need. The package is idempotent—calling it multiple times won’t reload modules unnecessarily.
How do I integrate this with Laravel’s service container?
Register the package as a singleton in `AppServiceProvider` using `$this->app->singleton('jpgraph', function () { return new MtJpGraph(); })`. Then inject the service or create a facade for cleaner usage.
Will this work for generating charts in PDFs or email attachments?
Yes, this package is ideal for server-side rendering. Use it with Laravel’s `SnappyPDF`, `DomPDF`, or `Mailable` classes to embed charts in PDFs or emails without client-side dependencies.
What are the risks of using Extended Mode with multiple modules?
Extended Mode (`MtJpGraph::load(['bar', 'line'], true)`) may introduce side effects if modules conflict. Test thoroughly in staging, and consider caching chart outputs to reduce load.
How do I handle font path issues (e.g., TTF_DIR not found)?
Define the font directory before loading: `define('TTF_DIR', storage_path('fonts'));` then call `MtJpGraph::load()`. Validate the path in `AppServiceProvider` to avoid runtime errors.
Is this package actively maintained? What if JpGraph updates?
The package lacks recent commits (last release: 2026-04-06), so maintenance is unclear. Monitor the repo or fork it to handle future JpGraph updates or PHP version changes.
Can I use this for high-traffic APIs (e.g., 1000+ charts/minute)?
JpGraph’s GD-based rendering may struggle under heavy load. Cache outputs (e.g., Redis or file storage) and offload generation to Laravel Queues to improve scalability.
What if GD library is missing on my Laravel Forge/Heroku server?
Add `"ext-gd": "*"` to your `composer.json` requirements and reinstall dependencies. GD is required for JpGraph to render charts.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai