PHPackages                             fidum/laravel-dashboard-chart-tile - 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. [Admin Panels](/categories/admin)
4. /
5. fidum/laravel-dashboard-chart-tile

ActiveLibrary[Admin Panels](/categories/admin)

fidum/laravel-dashboard-chart-tile
==================================

Generic chart tiles for laravel dashboard

6.2.0(1y ago)16234.7k↓27.3%91MITPHPPHP ^8.3CI passing

Since May 14Pushed 1y ago4 watchersCompare

[ Source](https://github.com/fidum/laravel-dashboard-chart-tile)[ Packagist](https://packagist.org/packages/fidum/laravel-dashboard-chart-tile)[ Docs](https://github.com/fidum/laravel-dashboard-chart-tile)[ GitHub Sponsors](https://github.com/dmason30)[ RSS](/packages/fidum-laravel-dashboard-chart-tile/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (22)Used By (1)

Laravel Dashboard Charting Tile
===============================

[](#laravel-dashboard-charting-tile)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1af281b8dee3b8b28ebc870adb61a02bb4d2af9e0cc10d616941470f784330dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666964756d2f6c61726176656c2d64617368626f6172642d63686172742d74696c652e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/fidum/laravel-dashboard-chart-tile)[![GitHub Workflow Status (with branch)](https://camo.githubusercontent.com/85889d2a0bb95d1f91ce425c8776ac232f8d5163451d8a54f43236ca86917ed3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f666964756d2f6c61726176656c2d64617368626f6172642d63686172742d74696c652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666f722d7468652d6261646765)](https://github.com/fidum/laravel-dashboard-chart-tile/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Codecov](https://camo.githubusercontent.com/86ac3c54bf6a44ed51390b28aee66c2970ed9c00625d1b53615382f7625209ce/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f666964756d2f6c61726176656c2d64617368626f6172642d63686172742d74696c653f6c6f676f3d636f6465636f76266c6f676f436f6c6f723d7768697465267374796c653d666f722d7468652d6261646765)](https://codecov.io/gh/fidum/laravel-dashboard-chart-tile)[![Twitter Follow](https://camo.githubusercontent.com/3ecd70148f9f16e2e0d66fcde3428926f1df4d6797ea463473ccf60dcdf7758a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f666f6c6c6f772d25343064616e6d61736f6e6d702d3144413146323f6c6f676f3d74776974746572267374796c653d666f722d7468652d6261646765)](https://twitter.com/danmasonmp)

Show off your charting skills with this easy to use tile. Supports line, bar, pie, doughnut and many more!

[![Preview](docs/preview.png)](docs/preview.png)

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

[](#installation)

You can install the package via composer:

```
composer require fidum/laravel-dashboard-chart-tile
```

Usage
-----

[](#usage)

In the `dashboard` config file, you can optionally add this configuration in the `tiles` key.

```
// in config/dashboard.php
return [
    // ...
    'tiles' => [
        'charts' => [
            'refresh_interval_in_seconds' => 300, // Default: 300 seconds (5 minutes)
        ],
    ],
];
```

This tile uses `chart.js` to render the charts with the help of `Laravel Charts` package see links to documentation for both below:

- [Laravel Charts Documentation](https://charts.erik.cat/)
- [Chart.js Documentation](https://www.chartjs.org/docs/latest/charts/)

So that you can easily add your datasets and configure your charts exactly how you want them you need to create a chart class that implements the `Fidum\ChartTile\Contracts\ChartFactory` interface.

See chart example below:

```
namespace App\Charts;

use Carbon\Carbon;
use Fidum\ChartTile\Charts\Chart;
use Fidum\ChartTile\Contracts\ChartFactory;

class ExampleBarChart implements ChartFactory
{
    public static function make(array $settings): ChartFactory
    {
        return new static;
    }

    public function chart(): Chart
    {
        $date = Carbon::now()->subMonth()->startOfDay();

        $data = collect(range(0, 12))->map(function ($days) use ($date) {
            return [
                'x' => $date->clone()->addDays($days)->toDateString(),
                'y' => rand(100, 500),
            ];
        });

        $chart = (new Chart)
            ->labels($data->pluck('x')->toArray())
            ->options([
                  'responsive' => true,
                  'maintainAspectRatio' => false,
                  // etc...
             ], true);

        $chart->dataset('Example Data', 'bar', $data->toArray())
            ->backgroundColor('#848584');

        return $chart;
    }
}
```

In your dashboard view you can use the below component as many times as needed. Pass your chart class reference to the component and that will be used to generate the chart.

```

```

### Optional properties:

[](#optional-properties)

- `chartFilters` optional key value array of settings that is passed to your chart `static::make` method. **Only use this for passing simple values `strings`, `integers`, `arrays` etc.**To use this you will have to use `@livewire` syntax over the component syntax in order set the array value.

```
@livewire('chart-tile', [
    'chartFactory' => App\Charts\DailyUsersChart::class,
    'chartFilters' => ['type' => 'customer'],
])
```

- `height` sets the height of the chart, depending on your dashboard layout you may need to adjust this (defaults to `100%`).
- `refreshIntervalInSeconds` use this to override the refresh rate of an individual tile (defaults to `300` seconds)

Examples
--------

[](#examples)

We have provided some chart factory examples to help get you started [here](examples). You can use the below dashboard layout to have an instant showcase of these examples:

```

```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security
--------

[](#security)

If you discover any security related issues, please email :author\_email instead of using the issue tracker.

Credits
-------

[](#credits)

- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance43

Moderate activity, may be stable

Popularity44

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 98.8% 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 ~87 days

Recently: every ~187 days

Total

21

Last Release

448d ago

Major Versions

1.1.0 → 2.0.02020-05-15

2.x-dev → 3.0.02020-07-05

3.1.1 → 4.0.02020-09-10

3.x-dev → 5.0.02022-08-19

5.x-dev → 6.0.02023-12-02

PHP version history (4 changes)1.0.0PHP ^7.4

4.0.1PHP ^7.4|^8.0

6.0.0PHP ^8.1

6.2.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce00db7f776e4eedafb4c929c8996ce27544888a84fbe2a210f32f0eb38aa794?d=identicon)[dmason30](/maintainers/dmason30)

---

Top Contributors

[![dmason30](https://avatars.githubusercontent.com/u/20278756?v=4)](https://github.com/dmason30 "dmason30 (80 commits)")[![ConsoleTVs](https://avatars.githubusercontent.com/u/6124435?v=4)](https://github.com/ConsoleTVs "ConsoleTVs (1 commits)")

---

Tags

chartdashboardlaravellaravel-frameworkspatietilechartfidumlaravel-dashboardlaravel-dashboard-chart-tile

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fidum-laravel-dashboard-chart-tile/health.svg)

```
[![Health](https://phpackages.com/badges/fidum-laravel-dashboard-chart-tile/health.svg)](https://phpackages.com/packages/fidum-laravel-dashboard-chart-tile)
```

PHPackages © 2026

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