Weave 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
Chartjs Bundle

Chartjs Bundle Laravel Package

fados/chartjs-bundle

fados/chartjs-bundle is a PHP package that streamlines adding Chart.js charts to your application, offering a straightforward way to configure datasets and render interactive visualizations for dashboards and reports.

View on GitHub
Deep Wiki
Context7

fados/chartjs-bundle integrates Chart.js into your PHP application, letting you define charts in server-side code and render them in your templates without hand-writing repetitive JavaScript. Configure chart types, datasets, labels, and options through a clean, structured API, then output ready-to-use canvas markup and initialization scripts.

  • Fluent builders for chart types, datasets, labels, and options
  • Server-side data preparation with automatic JSON serialization
  • Template helpers for rendering canvas elements and init code
  • Sensible defaults with full access to native Chart.js options
  • Lightweight, framework-friendly integration
Frequently asked questions about Chartjs Bundle
Can I use fados/chartjs-bundle in a Laravel application?
No. fados/chartjs-bundle is a Symfony 2 bundle that depends on Symfony's HttpKernel Bundle class, DI compiler passes, and Twig extension tagging, none of which Laravel provides. Laravel uses service providers and Blade, and the package ships no adapter layer. Composer will also refuse to resolve it against a modern Laravel application.
Why does Composer fail to install fados/chartjs-bundle in Laravel?
The bundle typically constrains symfony/framework-bundle to ~2.3 or ~2.8 and PHP to >=5.3, while current Laravel releases require PHP 8.1+ and pull Symfony 6 or 7 components transitively. Those constraints are mutually exclusive, so composer require stops with a dependency conflict before any code is evaluated. Using --ignore-platform-reqs only leaves an autoloaded bundle class that Laravel never instantiates.
What does fados/chartjs-bundle actually do?
It is a small Symfony 2 bundle that adds a Twig helper for Chart.js. The helper emits a canvas element and serializes a chart configuration array to JSON so a browser-side Chart.js instance can render it. It does not provide server-side rendering, a JavaScript build, or any Laravel integration.
Is fados/chartjs-bundle compatible with Chart.js v3 and v4?
No. The generated configuration targets the Chart.js v1/v2 API, while Chart.js v3 (2021) and v4 (2022) changed the scales, tooltip callback, and default configuration APIs. Even if you extracted the output, the markup would be stale against a modern Chart.js runtime. You would need to rewrite the config generation regardless of framework.
Is fados/chartjs-bundle still maintained?
No meaningful maintenance is visible. The last release was 2017-08-11, the repository has around 2 stars and 0 dependents, and there is no CI badge or test suite reference. Zero dependents means no third party has validated it in production and there is no downstream ecosystem to surface bugs. Treat it as abandoned.
How do I render Chart.js charts in a Laravel Blade template without this bundle?
Build a small Blade component that renders a canvas and passes the config as JSON, for example an x-chart component using @json($config) or data attributes, then initialize new Chart(ctx, config) in your existing Vite/JS bundle. That is roughly a half-day of work and gives you full ownership. It avoids pulling Symfony's kernel into Laravel or forking an abandoned bundle.
What PHP and Symfony versions does fados/chartjs-bundle require?
The bundle targets Symfony 2.3/2.8 and PHP >=5.3, which matches the era it was released in. It does not declare support for Laravel or for modern PHP versions. A current Laravel application needs PHP 8.1+ and Symfony 6/7 components, so the requirements do not overlap.
Is it safe to run a Symfony 2 bundle in production?
It is not advisable. Symfony 2.8, the final 2.x LTS, ended community support in November 2018 and commercial support in 2019, so any transitive Symfony 2.x dependency is unpatched against CVEs disclosed since. The bundle itself is unmaintained, with no releases since 2017. Running it in production means owning the security risk yourself.
Does fados/chartjs-bundle support server-side chart image rendering?
No. The bundle only outputs a canvas element and a JSON chart configuration for client-side Chart.js. It does not render PNG or SVG on the server and has no export, queue, or headless-browser integration. If you need server-side images, you need a different tool entirely.
What are the alternatives to fados/chartjs-bundle for Laravel projects?
For Laravel, the practical options are writing a small in-house Blade component plus a Chart.js wrapper, or using a maintained Laravel chart package that fits your PHP and Laravel versions. Forking this bundle into a service provider and Blade component is only about 50 to 150 lines, but then you own the fork. Because the feature surface is thin, in-house is usually cheaper than adopting or forking.
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.
vento/laravel-airbrake
wfeller/laravel-batch
maco-studios/mage-os-installer
busarm/armie
siberfx/laravel-logger
kfteam1991/dcat-admin
dashed/dashed-laposta
dashed/dashed-ecommerce-montaportal
dashed/dashed-ecommerce-etsy
neohq/string-blade-compiler
log1x/acf-composer
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager