PHPackages                             laravel-admin-ext/sparkline - 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. laravel-admin-ext/sparkline

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

laravel-admin-ext/sparkline
===========================

Integrates jQuery sparkline into laravel-admin

v1.0.0(7y ago)161.1k3MITPHPPHP &gt;=7.0.0

Since Sep 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/laravel-admin-extensions/sparkline)[ Packagist](https://packagist.org/packages/laravel-admin-ext/sparkline)[ Docs](https://github.com/laravel-admin-ext/sparkline)[ RSS](/packages/laravel-admin-ext-sparkline/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Use jQuery Sparkline in laravel-admin
=====================================

[](#use-jquery-sparkline-in-laravel-admin)

Screenshots
-----------

[](#screenshots)

[![qq20180926-010814](https://user-images.githubusercontent.com/1479100/46030513-edf66280-c128-11e8-9589-13adb73f432a.png)](https://user-images.githubusercontent.com/1479100/46030513-edf66280-c128-11e8-9589-13adb73f432a.png)

[![qq20180926-010742](https://user-images.githubusercontent.com/1479100/46030524-f9498e00-c128-11e8-8acb-4e85a0f58ba7.png)](https://user-images.githubusercontent.com/1479100/46030524-f9498e00-c128-11e8-8acb-4e85a0f58ba7.png)

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

[](#installation)

```
composer require laravel-admin-ext/sparkline

php artisan vendor:publish --tag=laravel-admin-sparkline
```

Configuration
-------------

[](#configuration)

Open `config/admin.php`, add configurations that belong to this extension at `extensions` section.

```
    'extensions' => [

        'sparkline' => [

            // Set to `false` if you want to disable this extension
            'enable' => true,
        ]
    ]
```

Usage
-----

[](#usage)

### Use as chart panel

[](#use-as-chart-panel)

Create a view in views directory like `resources/views/admin/sparkline/bar.blade.php`, and add following codes:

```

    $(function () {
        $("#sparkline-bar").sparkline([6,4,8, 9, 10, 5, 13, 18, 21, 7, 9], {
            type: 'bar',
            width: '100%',
            height: 150,
            barSpacing: 3,
            barWidth: 20,
            barColor: "#f39c12"
        });
    });

```

Then show it on the page

```
class SparklineController extends Controller
{
    public function index(Content $content)
    {
        return $content
            ->header('jQuery sparkline')
            ->body(new Box('Bar chart', view('admin.sparkline.bar')));
    }
}
```

For more usage, please refer to the official [Documentation](https://omnipotent.net/jquery.sparkline) of jQuery sparkline.

### Use in grid column

[](#use-in-grid-column)

If column `scores` returns a value with array type, and you wants to display this column as a inline line graphs

```
$grid->scores()->sparkline('line');

// add options
$grid->scores()->sparkline('line', [
    'width' => 100,
    'spotRadius' => 2
]);
```

There are also 6 other chart types such as `bar`, `pie`,`box`,`tristate`,`bullet`,`discrete`, and all options can be found in official [Documentation](https://omnipotent.net/jquery.sparkline) of jQuery sparkline.

Donate
------

[](#donate)

> Help keeping the project development going, by donating a little. Thanks in advance.

[![PayPal Me](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.me/zousong)

[![-1](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)

License
-------

[](#license)

Licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2792d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48536779?v=4)[encore](/maintainers/encore)[@encore](https://github.com/encore)

---

Top Contributors

[![z-song](https://avatars.githubusercontent.com/u/1479100?v=4)](https://github.com/z-song "z-song (2 commits)")

---

Tags

chartsextensionlaravel-adminsparklineextensionlaravel-adminsparkline

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laravel-admin-ext-sparkline/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-admin-ext-sparkline/health.svg)](https://phpackages.com/packages/laravel-admin-ext-sparkline)
```

###  Alternatives

[laravel-admin-ext/chartjs

Use Chartjs in laravel-admin

102180.6k1](/packages/laravel-admin-ext-chartjs)[laravel-admin-ext/china-distpicker

Distpicker extension for laravel-admin

13443.9k](/packages/laravel-admin-ext-china-distpicker)[laravel-admin-ext/grid-sortable

Sort the grid data by drag and drop rows

42119.3k](/packages/laravel-admin-ext-grid-sortable)[jxlwqq/json-editor

JSON Editor for Laravel-admin

32101.8k](/packages/jxlwqq-json-editor)[jxlwqq/env-manager

Env Manager for Laravel-admin

3719.9k](/packages/jxlwqq-env-manager)[jxlwqq/quill

quill editor for laravel-admin

2427.1k](/packages/jxlwqq-quill)

PHPackages © 2026

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