PHPackages                             cj-bigdevil/chartjs - 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. [Templating &amp; Views](/categories/templating)
4. /
5. cj-bigdevil/chartjs

ActiveLibrary[Templating &amp; Views](/categories/templating)

cj-bigdevil/chartjs
===================

Use Chartjs in laravel-admin

03PHP

Since Feb 1Pushed 3y agoCompare

[ Source](https://github.com/CJ-BigDevil/chartjs)[ Packagist](https://packagist.org/packages/cj-bigdevil/chartjs)[ RSS](/packages/cj-bigdevil-chartjs/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Use Chartjs in laravel-admin
============================

[](#use-chartjs-in-laravel-admin)

Screenshot
----------

[](#screenshot)

[![qq20180917-132122](https://user-images.githubusercontent.com/1479100/45607189-2b018b80-ba7d-11e8-845e-d7ab810bc07f.png)](https://user-images.githubusercontent.com/1479100/45607189-2b018b80-ba7d-11e8-845e-d7ab810bc07f.png)

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

[](#installation)

```
composer require cj-bigdevil/chartjs

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

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

[](#configuration)

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

```
    'extensions' => [

        'chartjs' => [

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

Usage
-----

[](#usage)

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

```

$(function () {
    var ctx = document.getElementById("myChart").getContext('2d');
    var myChart = new Chart(ctx, {
        type: 'bar',
        data: {
            labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
            datasets: [{
                label: '# of Votes',
                data: [12, 19, 3, 5, 2, 3],
                backgroundColor: [
                    'rgba(255, 99, 132, 0.2)',
                    'rgba(54, 162, 235, 0.2)',
                    'rgba(255, 206, 86, 0.2)',
                    'rgba(75, 192, 192, 0.2)',
                    'rgba(153, 102, 255, 0.2)',
                    'rgba(255, 159, 64, 0.2)'
                ],
                borderColor: [
                    'rgba(255,99,132,1)',
                    'rgba(54, 162, 235, 1)',
                    'rgba(255, 206, 86, 1)',
                    'rgba(75, 192, 192, 1)',
                    'rgba(153, 102, 255, 1)',
                    'rgba(255, 159, 64, 1)'
                ],
                borderWidth: 1
            }]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero:true
                    }
                }]
            }
        }
    });
});

```

Then show it on the page

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

For more usage, please refer to the official [documentation](https://www.chartjs.org/docs/latest/) of chartjs.

License
-------

[](#license)

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

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/df5c537891e3916f5c7a0c29056bbce17d7ec01e8e5231d9b4dd489c5689c7c0?d=identicon)[CJ-BigDevil](/maintainers/CJ-BigDevil)

---

Top Contributors

[![z-song](https://avatars.githubusercontent.com/u/1479100?v=4)](https://github.com/z-song "z-song (6 commits)")[![jxlwqq](https://avatars.githubusercontent.com/u/2421068?v=4)](https://github.com/jxlwqq "jxlwqq (1 commits)")[![wuwx](https://avatars.githubusercontent.com/u/4401?v=4)](https://github.com/wuwx "wuwx (1 commits)")

### Embed Badge

![Health badge](/badges/cj-bigdevil-chartjs/health.svg)

```
[![Health](https://phpackages.com/badges/cj-bigdevil-chartjs/health.svg)](https://phpackages.com/packages/cj-bigdevil-chartjs)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.1k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.3k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

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