coroowicaksono/chart-js-integration
A Laravel Nova package that integrates Chart.js into dashboards, providing ready-to-use chart cards and widgets for building responsive line, bar, pie, and doughnut visualizations with simple PHP configuration and customizable datasets.
Architecture fit
Laravel\Nova\Card and ships a pre-compiled Vue component that Nova mounts on a dashboard or resource page. It is unusable outside a Nova installation.NovaServiceProvider::dashboards() alongside metrics, and inherit Nova's layout, routing, auth middleware, and theme.Integration feasibility
composer require coroowicaksono/chart-js-integration, add the card to a dashboard definition, and supply type / series / options / height via a fluent API. A working card is a half-day spike for a mid-level Laravel developer.stdClass (e.g. an aggregate row from DB::table()->first(), or a json_decode()d config) into the series/options payload raised a PHP type error. Post-patch, the package tolerates it. Practical consequence: the payload type is not a strict, documented contract, and the correct fix is on our side — normalize every chart payload to plain arrays in our own layer rather than relying on the package's coercion. This slightly increases the value of the ChartDefinition DTO recommended below.Technical risk
GROUP BY over a large table.Key questions
stdClass shapes? If so, we should normalize them to arrays rather than depend on the v0.4.3 coercion, so a future refactor doesn't reintroduce the crash.Stack fit
Migration path (and exit path)
new Chartjs(...) calls across dashboard classes. Introduce a thin internal layer:
ChartDefinition DTO (title, type, series, options, height, cache key, TTL),ChartCardFactory that maps a DTO to the package's card,toArray() normalization step on the DTO — all payloads leave our layer as plain arrays, never stdClass or Eloquent models. This makes the v0.4.3 fix a non-event for us and keeps the payload contract under our control.ChartDataSource interface so each chart's query is testable independent of rendering.Compatibility and sequencing
composer.json exact constraint, not ^0.4) plus composer.lock, and a documented fork procedure.Maintenance
^ ranges to float into a Nova-breaking release during an unrelated deploy. The 0.x version line makes this non-negotiable.Support
Scaling
Failure modes
Ramp-up
TPM recommendation Recommendation unchanged by v0.4.3. Proceed only if Nova is already the admin dashboard and the required charts are the six standard types. The patch removes a known runtime failure and is a marginally positive maintenance signal, but it adds no capability, no compatibility statement, and does not offset the pre-1.0 API, single-maintainer, and closed-source-Nova risks.
Adopt behind the factory/DTO abstraction with mandatory array normalization, pin to an exact version, and gate on a one-week Nova-version spike that explicitly exercises v0.4.3. If Nova is not in place, or if charts need interactive formatting, skip this package — the dependency risk is not repaid by the feature set.
How can I help you explore Laravel packages today?