PHPackages                             adecks/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. adecks/chartjs

ActiveLibrary

adecks/chartjs
==============

PHP Model Abstraction of ChartJs Objects

v1.0.1(5y ago)27MITPHPPHP ^7.1

Since Mar 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/AndreKendeck/PHPChartjs)[ Packagist](https://packagist.org/packages/adecks/chartjs)[ Docs](https://github.com/AndreKendeck/PHPChartjs)[ RSS](/packages/adecks-chartjs/feed)WikiDiscussions main Synced 6d ago

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

PHP Chart.js
============

[](#php-chartjs)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9f45874d22d95f01af18ee20ac5b5c083cb868ef69982bdb0129d30b41cc946e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616465636b732f63686172746a732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/adecks/chartjs)

[![PHP Composer](https://github.com/AndreKendeck/PHPChartjs/actions/workflows/php.yml/badge.svg?branch=main)](https://github.com/AndreKendeck/PHPChartjs/actions/workflows/php.yml)

[![Total Downloads](https://camo.githubusercontent.com/15c1a3546d5dadb823adfffcd0fa169e53d15f74b2ab321e599f93c84eaee749/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616465636b732f63686172746a732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/adecks/chartjs)

I made this package, since most of my PHP projects make use of graphs, my go to graphing library

if you require more information about chartjs please go [Offical Docs](https://www.chartjs.org/docs/master/).

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

[](#installation)

You can install the package via composer:

```
composer require adecks/chartjs -vvv
```

Creating a chart
----------------

[](#creating-a-chart)

**Creating a Line chart**

```
use Adecks\ChartJs\Types\Line;
use Adecks\ChartJs\Options;
use Adecks\ChartJs\Datasets\Dataset;

class ExampleController extends Controller {

	public function index() {

		$xAxisLabels = ['Jan','Feb','Mar'];

		$chartOptions = new Options;

		$lineChart =  new Line($xAxisLabels,$chartOptions);

		$lineChart->addDataset((new Dataset('MyFirstData',[10,12,13]));

		return response()->json($lineChart);

	}

}
```

**Creating a chart with a (x,y) value**

```
(new Bubble(['Jan','Feb','Mar']))->addData(new Dataset('MyfirsData', ['x' => 123 , 'y' => 321 , 'r' => 10 );
```

**The JSON structure from result**

```
{
"type": "line",
"data": {
	"labels": ["Jan","Feb","Mar"],
	"datasets": [{"label": "MyFirstData",
		"backgroundColor": "red",
		"borderColor": "red",
		"data": [10,12,13]}]
	}
}
```

Types of Charts.
----------------

[](#types-of-charts)

```
use Adecks\ChartJs\Types\Bar;
use Adecks\ChartJs\Types\Bubble;
use Adecks\ChartJs\Types\Doughnut;
use Adecks\ChartJs\Types\Line;
use Adecks\ChartJs\Types\Pie;
use Adecks\ChartJs\Types\PolarArea;
use Adecks\ChartJs\Types\Radar;
use Adecks\ChartJs\Types\Scatter;
```

### Testing

[](#testing)

```
php vendor/bin/phpunit
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

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

Credits
-------

[](#credits)

- [Andre Kendeck](https://github.com/adecks)

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Every ~0 days

Total

2

Last Release

1873d ago

### Community

Maintainers

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

---

Top Contributors

[![AndreKendeck](https://avatars.githubusercontent.com/u/41024720?v=4)](https://github.com/AndreKendeck "AndreKendeck (2 commits)")

---

Tags

chartjschartscomposerpackagephpchartjschartsadecks

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[khill/lavacharts

PHP wrapper library for the Google Chart API

6202.0M2](/packages/khill-lavacharts)[ghunti/highcharts-php

A php wrapper for highcharts and highstock javascript libraries

3772.3M5](/packages/ghunti-highcharts-php)[icehouse-ventures/laravel-chartjs

Simple package to facilitate and automate the use of charts in Laravel using the Chart.js library

117186.4k](/packages/icehouse-ventures-laravel-chartjs)[fx3costa/laravelchartjs

Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library

486471.0k4](/packages/fx3costa-laravelchartjs)[szymach/c-pchart

Port of "pChart" library into PHP 8+

1512.3M7](/packages/szymach-c-pchart)[arielmejiadev/larapex-charts

Package to provide easy api to build apex charts on Laravel

302445.7k](/packages/arielmejiadev-larapex-charts)

PHPackages © 2026

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