PHPackages                             wobeto/easychart - 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. wobeto/easychart

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

wobeto/easychart
================

PHP chart library based in Libchart.

0.6.0(11y ago)67961MITPHPPHP &gt;=5.3.0

Since Dec 16Pushed 11y ago1 watchersCompare

[ Source](https://github.com/fernandowobeto/easychart)[ Packagist](https://packagist.org/packages/wobeto/easychart)[ RSS](/packages/wobeto-easychart/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (6)Used By (0)

EasyChart
=========

[](#easychart)

PHP chart library based in Libchart

[![Build Status](https://camo.githubusercontent.com/f974533388878352fc2d0fed5eb08549e80a1b46facf7775ea69682b998975b9/68747470733a2f2f7472617669732d63692e6f72672f6665726e616e646f776f6265746f2f6561737963686172742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fernandowobeto/easychart)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/620b393f79df4a049558c316f7fa3b7779d9b10d09643cb93f9bc3e140e67e70/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6665726e616e646f776f6265746f2f6561737963686172742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/fernandowobeto/easychart/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/b0c936d48250bb3bf5e73b40b9faceaa905af1bff96250a465d7c979715870e7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6665726e616e646f776f6265746f2f6561737963686172742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/fernandowobeto/easychart/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/7c34c5929b9863c0c1f0d2d3c07a99b13becba073ddbb7de6a9da94a771e51a5/68747470733a2f2f706f7365722e707567782e6f72672f776f6265746f2f6561737963686172742f762f737461626c652e737667)](https://packagist.org/packages/wobeto/easychart) [![Total Downloads](https://camo.githubusercontent.com/babdde94b96ec8da199895b72820cea6da48fdae605164666920647f88879747/68747470733a2f2f706f7365722e707567782e6f72672f776f6265746f2f6561737963686172742f646f776e6c6f6164732e737667)](https://packagist.org/packages/wobeto/easychart) [![Latest Unstable Version](https://camo.githubusercontent.com/63f65799643a26eddbaac4676076e0fa5bfd6e4a688cde5d227c2ff3cf9ecb17/68747470733a2f2f706f7365722e707567782e6f72672f776f6265746f2f6561737963686172742f762f756e737461626c652e737667)](https://packagist.org/packages/wobeto/easychart) [![License](https://camo.githubusercontent.com/5a0e8a41895a03276d63a9c8de453a375eb30d24077086fe79b3be88d1184636/68747470733a2f2f706f7365722e707567782e6f72672f776f6265746f2f6561737963686172742f6c6963656e73652e737667)](https://packagist.org/packages/wobeto/easychart)

Features
--------

[](#features)

- Bar charts (horizontal or vertical).
- Line charts.
- Pie charts.
- Single or multiple data sets.

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

[](#installation)

Add wobeto/easychart to your composer.json file:

```
"require": {
  "wobeto/easychart": "0.6.0"
}

```

Use composer to install this package.

```
$ composer update

```

Examples
--------

[](#examples)

Vertical Bar Chart
------------------

[](#vertical-bar-chart)

```
use Wobeto\EasyChart\VerticalBarChart;
use Wobeto\EasyChart\Model\XYDataSet;
use Wobeto\EasyChart\Model\Point;

$chart = new VerticalBarChart(500,250);

$dataSet = new XYDataSet();
$dataSet->addPoint(new Point("2014", 285));
$dataSet->addPoint(new Point("2015", 34));
$chart->setDataSet($dataSet);

$chart->setTitle("Annual usage for easychart");
echo $chart->render();
```

[![Vertical Bar](https://github.com/fernandowobeto/easychart/raw/master/docs/images/vertical_bar.png)](https://github.com/fernandowobeto/easychart/raw/master/docs/images/vertical_bar.png)

Horizontal Bar Chart
--------------------

[](#horizontal-bar-chart)

```
use Wobeto\EasyChart\HorizontalBarChart;
use Wobeto\EasyChart\Model\XYDataSet;
use Wobeto\EasyChart\Model\Point;
use Wobeto\EasyChart\View\Primitive\Padding;

$chart = new HorizontalBarChart(500, 250);

$dataSet = new XYDataSet();
$dataSet->addPoint(new Point("/wiki/Instant_messenger", 20));
$dataSet->addPoint(new Point("/wiki/Web_Browser", 35));
$dataSet->addPoint(new Point("/wiki/World_Wide_Web", 68));
$chart->setDataSet($dataSet);

$chart->getPlot()->setGraphPadding(new Padding(5, 30, 20, 140));
$chart->setTitle("Most visited pages");
echo $chart->render();
```

[![Horizontal Bar](https://github.com/fernandowobeto/easychart/raw/master/docs/images/horizontal_chart.png)](https://github.com/fernandowobeto/easychart/raw/master/docs/images/horizontal_chart.png)

Pie Chart
---------

[](#pie-chart)

```
use Wobeto\EasyChart\PieChart;
use Wobeto\EasyChart\Model\XYDataSet;
use Wobeto\EasyChart\Model\Point;

$chart = new PieChart(500, 300);

$dataSet = new XYDataSet();
$dataSet->addPoint(new Point("Mozilla Firefox", 46));
$dataSet->addPoint(new Point("Chrome", 40));
$dataSet->addPoint(new Point("Internet Explorer", 12));
$dataSet->addPoint(new Point("Others", 2));
$chart->setDataSet($dataSet);
$chart->setLabelFormat('%01.2f%%');

$chart->setTitle("User agents for www.example.com");
echo $chart->render();
```

[![Pie Chart](https://github.com/fernandowobeto/easychart/raw/master/docs/images/pie_chart.png)](https://github.com/fernandowobeto/easychart/raw/master/docs/images/pie_chart.png)

Multiple line chart
-------------------

[](#multiple-line-chart)

```
use Wobeto\EasyChart\LineChart;
use Wobeto\EasyChart\Model\XYDataSet;
use Wobeto\EasyChart\Model\XYSeriesDataSet;
use Wobeto\EasyChart\Model\Point;

$chart = new LineChart();

$serie1 = new XYDataSet();
$serie1->addPoint(new Point("06-01", 273));
$serie1->addPoint(new Point("06-02", 421));
$serie1->addPoint(new Point("06-03", 642));
$serie1->addPoint(new Point("06-04", 799));
$serie1->addPoint(new Point("06-05", 1009));
$serie1->addPoint(new Point("06-06", 1106));

$serie2 = new XYDataSet();
$serie2->addPoint(new Point("06-01", 280));
$serie2->addPoint(new Point("06-02", 300));
$serie2->addPoint(new Point("06-03", 212));
$serie2->addPoint(new Point("06-04", 542));
$serie2->addPoint(new Point("06-05", 600));
$serie2->addPoint(new Point("06-06", 850));

$serie3 = new XYDataSet();
$serie3->addPoint(new Point("06-01", 180));
$serie3->addPoint(new Point("06-02", 400));
$serie3->addPoint(new Point("06-03", 512));
$serie3->addPoint(new Point("06-04", 642));
$serie3->addPoint(new Point("06-05", 700));
$serie3->addPoint(new Point("06-06", 900));

$serie4 = new XYDataSet();
$serie4->addPoint(new Point("06-01", 280));
$serie4->addPoint(new Point("06-02", 500));
$serie4->addPoint(new Point("06-03", 612));
$serie4->addPoint(new Point("06-04", 742));
$serie4->addPoint(new Point("06-05", 800));
$serie4->addPoint(new Point("06-06", 1000));

$serie5 = new XYDataSet();
$serie5->addPoint(new Point("06-01", 380));
$serie5->addPoint(new Point("06-02", 600));
$serie5->addPoint(new Point("06-03", 712));
$serie5->addPoint(new Point("06-04", 842));
$serie5->addPoint(new Point("06-05", 900));
$serie5->addPoint(new Point("06-06", 1200));

$dataSet = new XYSeriesDataSet();
$dataSet->addSerie("Product 1", $serie1);
$dataSet->addSerie("Product 2", $serie2);
$dataSet->addSerie("Product 3", $serie3);
$dataSet->addSerie("Product 4", $serie4);
$dataSet->addSerie("Product 5", $serie5);
$chart->setDataSet($dataSet);

$chart->setTitle("Sales for 2014");
$chart->getPlot()->setGraphCaptionRatio(0.62);

echo $chart->render();
```

[![Multiple Line Chart](https://github.com/fernandowobeto/easychart/raw/master/docs/images/multiple_line_chart.png)](https://github.com/fernandowobeto/easychart/raw/master/docs/images/multiple_line_chart.png)

Multiple vertical bar chart
---------------------------

[](#multiple-vertical-bar-chart)

```
use Wobeto\EasyChart\VerticalBarChart;
use Wobeto\EasyChart\Model\XYDataSet;
use Wobeto\EasyChart\Model\XYSeriesDataSet;
use Wobeto\EasyChart\Model\Point;

$chart = new VerticalBarChart();

$serie1 = new XYDataSet();
$serie1->addPoint(new Point("YT", 64));
$serie1->addPoint(new Point("NT", 63));
$serie1->addPoint(new Point("BC", 58));
$serie1->addPoint(new Point("AB", 58));
$serie1->addPoint(new Point("SK", 46));

$serie2 = new XYDataSet();
$serie2->addPoint(new Point("YT", 61));
$serie2->addPoint(new Point("NT", 60));
$serie2->addPoint(new Point("BC", 56));
$serie2->addPoint(new Point("AB", 57));
$serie2->addPoint(new Point("SK", 52));

$dataSet = new XYSeriesDataSet();
$dataSet->addSerie("2013", $serie1);
$dataSet->addSerie("2014", $serie2);
$chart->setDataSet($dataSet);
$chart->getPlot()->setGraphCaptionRatio(0.65);

$chart->setTitle("Average family income (k$)");
echo $chart->render();
```

[![Multiple Vertical Bar](https://github.com/fernandowobeto/easychart/raw/master/docs/images/multiple_vertical_bar_chart.png)](https://github.com/fernandowobeto/easychart/raw/master/docs/images/multiple_vertical_bar_chart.png)

Multiple horizontal bar chart
-----------------------------

[](#multiple-horizontal-bar-chart)

```
use Wobeto\EasyChart\HorizontalBarChart;
use Wobeto\EasyChart\Model\XYDataSet;
use Wobeto\EasyChart\Model\XYSeriesDataSet;
use Wobeto\EasyChart\Model\Point;

$chart = new HorizontalBarChart(500, 250);

$serie1 = new XYDataSet();
$serie1->addPoint(new Point("18-24", 22));
$serie1->addPoint(new Point("25-34", 17));
$serie1->addPoint(new Point("35-44", 20));
$serie1->addPoint(new Point("45-54", 25));

$serie2 = new XYDataSet();
$serie2->addPoint(new Point("18-24", 13));
$serie2->addPoint(new Point("25-34", 18));
$serie2->addPoint(new Point("35-44", 23));
$serie2->addPoint(new Point("45-54", 22));

$dataSet = new XYSeriesDataSet();
$dataSet->addSerie("Male", $serie1);
$dataSet->addSerie("Female", $serie2);
$chart->setDataSet($dataSet);

$chart->setTitle("Firefox vs Chrome users: Age");
echo $chart->render();
```

[![Multiple Horizontal Bar](https://github.com/fernandowobeto/easychart/raw/master/docs/images/multiple_horizontal_bar_chart.png)](https://github.com/fernandowobeto/easychart/raw/master/docs/images/multiple_horizontal_bar_chart.png)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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 ~5 days

Total

5

Last Release

4152d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/43f3e92e181c543219479dbeb200af99bad5158495857586cc1337ff07f1788c?d=identicon)[fernandowobeto](/maintainers/fernandowobeto)

---

Top Contributors

[![fernandowobeto](https://avatars.githubusercontent.com/u/686603?v=4)](https://github.com/fernandowobeto "fernandowobeto (23 commits)")

### Embed Badge

![Health badge](/badges/wobeto-easychart/health.svg)

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

PHPackages © 2026

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