PHPackages                             arbermustafa/filament-google-charts-widgets - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. arbermustafa/filament-google-charts-widgets

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

arbermustafa/filament-google-charts-widgets
===========================================

Chart widgets for Filament Php using Google Charts

2.0.2(2y ago)148.1k↓11.1%4[2 issues](https://github.com/arbermustafa/filament-google-charts-widgets/issues)[1 PRs](https://github.com/arbermustafa/filament-google-charts-widgets/pulls)MITPHPPHP ^8.1

Since Dec 5Pushed 2y ago2 watchersCompare

[ Source](https://github.com/arbermustafa/filament-google-charts-widgets)[ Packagist](https://packagist.org/packages/arbermustafa/filament-google-charts-widgets)[ Docs](https://github.com/arbermustafa/filament-google-charts-widgets)[ RSS](/packages/arbermustafa-filament-google-charts-widgets/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (3)Versions (15)Used By (0)

Filament Google Charts Widgets
==============================

[](#filament-google-charts-widgets)

[![](https://camo.githubusercontent.com/6efaf28a6043dfb7d56f8e8a72abc52a7f6fdac071453d2093b8670add5ec4db/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f46696c616d656e74253230476f6f676c65253230436861727473253230576964676574732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d61726265726d75737461666125324666696c616d656e742d676f6f676c652d6368617274732d77696467657473267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d43686172742b776964676574732b7573696e672b476f6f676c652b436861727473266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d63686172742d706965)](https://camo.githubusercontent.com/6efaf28a6043dfb7d56f8e8a72abc52a7f6fdac071453d2093b8670add5ec4db/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f46696c616d656e74253230476f6f676c65253230436861727473253230576964676574732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d61726265726d75737461666125324666696c616d656e742d676f6f676c652d6368617274732d77696467657473267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d43686172742b776964676574732b7573696e672b476f6f676c652b436861727473266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d63686172742d706965)

Create chart widgets using [Google Charts](https://developers.google.com/chart).

Installation
------------

[](#installation)

You can install the package into a Laravel app that uses [Filament](https://filamentphp.com) via composer::

```
composer require arbermustafa/filament-google-charts-widgets
```

**Filament V2** - if you are using Filament v2.x, you can use [this section](https://github.com/arbermustafa/filament-google-charts-widgets/tree/1.0.8)

You can publish the config file with:

```
php artisan vendor:publish --tag=filament-google-charts-widgets-config
```

The `config` file contains default global customization options for better charts rendering in light/dark theme based on the great work of [Weekdone](https://github.com/weekdone/GoogleChartStyles)

Optionally, you can publish the view using:

```
php artisan vendor:publish --tag=filament-google-charts-widgets-views
```

Usage
-----

[](#usage)

### Pie chart

[](#pie-chart)

```
use ArberMustafa\FilamentGoogleCharts\Widgets\PieChartWidget;

class DemoPieChart extends PieChartWidget
{
    protected static ?int $sort = 1;

    protected static ?array $options = [
        'legend' => [
            'position' => 'top',
            'alignment' => 'center',
        ],
        'height' => 400,
        'is3D' => false,
    ];

    protected function getHeading(): string
    {
        return 'Pie chart';
    }

    protected function getData(): array
    {
        return [
            ['Label', 'Aggregate'],
            ['Col1', 7.2],
            ['Col2', 23.7],
            ['Col3', 11.1],
        ];
    }
}
```

### Donut chart

[](#donut-chart)

```
use ArberMustafa\FilamentGoogleCharts\Widgets\DonutChartWidget;

class DemoDonutChart extends DonutChartWidget
{
    protected static ?string $heading = 'Donut chart';

    protected static ?int $sort = 2;

    protected static ?float $pieHole = 0.5;

    protected static ?array $options = [
        'legend' => [
            'position' => 'top',
        ],
        'height' => 400,
    ];

    protected function getData(): array
    {
        return [
            ['Label', 'Aggregate'],
            ['Col1', 17.2],
            ['Col2', 23.7],
            ['Col3', 11.1],
        ];
    }
}
```

[![Pie & Donut charts](./docs/images/demo-charts.png)](./docs/images/demo-charts.png)

Available chart types
---------------------

[](#available-chart-types)

Below is a list of available chart widget classes which you may extend, and their corresponding Google Charts documentation page, for inspiration what to return from getData():

- `ArberMustafa\FilamentGoogleCharts\Widgets\AreaChartWidget` - [Google Charts documentation](https://developers.google.com/chart/interactive/docs/gallery/areachart#configuration-options)
- `ArberMustafa\FilamentGoogleCharts\Widgets\BarChartWidget` - [Google Charts documentation](https://developers.google.com/chart/interactive/docs/gallery/barchart#configuration-options)
- `ArberMustafa\FilamentGoogleCharts\Widgets\ColumnChartWidget` - [Google Charts documentation](https://developers.google.com/chart/interactive/docs/gallery/columnchart#configuration-options)
- `ArberMustafa\FilamentGoogleCharts\Widgets\DonutChartWidget` - [Google Charts documentation](https://developers.google.com/chart/interactive/docs/gallery/piechart#donut)
- `ArberMustafa\FilamentGoogleCharts\Widgets\LineChartWidget` - [Google Charts documentation](https://developers.google.com/chart/interactive/docs/gallery/linechart#configuration-options)
- `ArberMustafa\FilamentGoogleCharts\Widgets\PieChartWidget` - [Google Charts documentation](https://developers.google.com/chart/interactive/docs/gallery/piechart#configuration-options)

Live updating (polling)
-----------------------

[](#live-updating-polling)

By default, chart widgets refresh their data every 5 seconds.

To customize this, you may override the `$pollingInterval` property on the class to a new interval:

```
protected static ?string $pollingInterval = '10s';
```

Alternatively, you may disable polling altogether:

```
protected static ?string $pollingInterval = null;
```

Chart configuration options
---------------------------

[](#chart-configuration-options)

You may specify an `$options` variable on the chart class to control the many configuration options that the [Google Charts](https://developers.google.com/chart) library provides. For instance, you could change the position off the legend for PieChartWidget class and set a custom height:

```
protected static ?array $options = [
        'legend' => [
            'position' => 'bottom',
        ],
        'height' => 300,
    ];
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

If you want to contribute to this package, you may want to test it in a real Filament project:

- Fork this repository to your Github account.
- Create a Filament app locally.
- Clone your fork in your Filament app root directoy.
- In the `/filament-google-charts-widgets` directory, create a branch for your fix/improvement, e.g. `fix/pie-chart`.

Install the packages in your app's `composer.json`:

```
"require": {
    "arbermustafa/filament-google-charts-widgets": "dev-fix/pie-chart as dev-main",
},
"repositories": [
    {
        "type": "path",
        "url": "./filament-google-charts-widgets"
    }
]
```

Now run `composer update`.

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Arber Mustafa](https://github.com/arbermustafa)
- [Google Web Components](https://github.com/GoogleWebComponents/google-chart)
- [Weekdone](https://github.com/weekdone/GoogleChartStyles)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~20 days

Recently: every ~1 days

Total

14

Last Release

1036d ago

Major Versions

1.0.7 → 2.0.02023-08-21

1.0.8 → 2.0.12023-08-21

PHP version history (2 changes)v1.0PHP ^8.0

2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1318974?v=4)[Arbër Mustafa](/maintainers/arbermustafa)[@arbermustafa](https://github.com/arbermustafa)

---

Top Contributors

[![arbermustafa](https://avatars.githubusercontent.com/u/1318974?v=4)](https://github.com/arbermustafa "arbermustafa (19 commits)")

---

Tags

chartsfilamentlaravelphplaravelchartsfilament-pluginarbermustafaGoogle Chartsfilament-google-charts-widgets

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/arbermustafa-filament-google-charts-widgets/health.svg)

```
[![Health](https://phpackages.com/badges/arbermustafa-filament-google-charts-widgets/health.svg)](https://phpackages.com/packages/arbermustafa-filament-google-charts-widgets)
```

###  Alternatives

[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

209175.5k8](/packages/bezhansalleh-filament-google-analytics)[arbermustafa/filament-locationpickr-field

Location picker field for Filament Php using Google Maps

1540.7k](/packages/arbermustafa-filament-locationpickr-field)[tapp/filament-google-autocomplete-field

Filament plugin that provides a Google Autocomplete field

30122.2k](/packages/tapp-filament-google-autocomplete-field)[spatie/filament-simple-stats

Opinionated prebuilt stat widgets to quickly add to your Filament dashboards.

2621.7k](/packages/spatie-filament-simple-stats)[wsmallnews/filament-nestedset

Filament nestedset tree builder powered by kalnoy/nestedset with Filament v4 and v5 support

196.5k14](/packages/wsmallnews-filament-nestedset)[tonegabes/filament-better-options

Filament form components for better radio and checkbox options.

168.1k](/packages/tonegabes-filament-better-options)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
