- How do I install arbermustafa/filament-google-charts-widgets in a Laravel Filament app?
- Install it with Composer using arbermustafa/filament-google-charts-widgets, then publish any config or Blade views the package ships. After that you subclass the package's widget base class, define your chart data and options, and register the widget on a Filament dashboard or page. The integration is a dashboard-layer-only change, so there is no service-provider wiring or deployment topology to rethink.
- Which Laravel, Filament, Livewire, and PHP versions does this package support?
- The package is a thin wrapper around Filament widgets, so its supported matrix is tied directly to Filament's major versions, and Filament has gone through significant v3 to v4 churn. Check the composer.json constraints against your exact Laravel, PHP, Filament, and Livewire versions before planning any work. Do not assume support for the newest Laravel or Filament release just because the package installs.
- How do I create a line chart widget with this package?
- You extend the package's chart widget class, supply your data as PHP arrays and your chart options, and drop the widget onto a Filament dashboard. Google Charts expects a DataTable shape, meaning a header row plus rows or a cols and rows object, so your PHP data must be shaped to match. Once registered, the widget renders through a Blade view that instantiates the Google Charts draw call in the browser.
- Do the charts refresh correctly with pollingInterval() and wire:navigate SPA navigation?
- This is the highest-risk part of any Filament chart widget. Google Charts draws into a DOM node once, while Livewire morphs that DOM on every poll, action, and SPA navigation, so a correct wrapper must re-instantiate the draw call after morph.updated, livewire:navigated, and widget refresh. If it does not, charts silently disappear or duplicate on poll, so verify this in a spike before committing.
- Which chart types are actually supported: line, bar, pie, area, and others?
- The package advertises configurable line, bar, pie, area, and other Google Charts types through a simple PHP API. Because it is a wrapper, some chart types may be genuinely wrapped while others amount to passing raw Google options through. Confirm which types have first-class support and which rely on you knowing the Google Charts options schema.
- Does it work with a strict Content Security Policy or in air-gapped environments?
- The chart library is loaded at runtime from Google's gstatic.com CDN, which creates CSP, supply-chain, availability, and data-residency exposure that security reviewers will flag. That makes it a poor fit for strict CSP setups, air-gapped deployments, or customer-facing compliance scope unless you self-host loader.js and can supply a nonce. Check whether the package exposes a nonce or self-hosted loader path before assuming it can be locked down.
- How much data can I render before performance degrades?
- Chart data crosses from PHP to JavaScript serialized inline into the HTML response, so it is comfortable for roughly 10 to 50 rows. Past a few thousand data points it becomes painful, both in response size and in browser draw time. For larger datasets, aggregate or bucket server-side and send a summarized series to the chart.
- Does it dedupe the Google Charts loader.js when several widgets appear on one page?
- Whether the package loads loader.js once per page or once per widget is not something you should assume. Multiple Google Charts widgets on a single dashboard is a normal Filament layout, so verify the loader is deduped to avoid redundant script tags and repeated callback registration. This is one of the key questions to answer in a spike before adopting it.
- Is this package actively maintained, and what are the alternatives?
- At roughly 14 stars it is pre-traction with a bus factor of one, so assume no upstream fixes for bugs you find. The MIT license lets you vendor or fork it, and the surface area is small enough that reimplementing the wrapper in a few hundred lines is realistic. Alternatives include Filament's built-in chart widgets, ApexCharts, or Chart.js, but migrating between them is not a 1:1 port because Google expects a different data and options schema.
- Can I pass a Google DataTable JSON object directly, or only PHP arrays?
- Google Charts accepts either a DataTable object with cols and rows or a header row plus data rows, but the package's PHP API may only accept plain arrays. Whether you can hand it a raw DataTable JSON payload needs to be confirmed against the source or a quick test. If it only takes arrays, plan a small normalization layer so you control the shape your charts receive.