PHPackages                             phpro/zf-charts - 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. phpro/zf-charts

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

phpro/zf-charts
===============

A chart abstraction layer for ZF.

v0.1.0(11y ago)21.3k1PHPPHP &gt;=5.4

Since Oct 16Pushed 5y ago5 watchersCompare

[ Source](https://github.com/phpro/zf-charts)[ Packagist](https://packagist.org/packages/phpro/zf-charts)[ RSS](/packages/phpro-zf-charts/feed)WikiDiscussions master Synced yesterday

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

> ## Repository abandoned 2020-11-27
>
> [](#repository-abandoned-2020-11-27)
>
> This repository has been archived since we are not using it anymore internally. Feel free to use it AS-IS, we won't be providing any support anymore.

Charts
======

[](#charts)

This package provides a PHP abstraction layer for multiple javascript chart libraries for Zend Framework 2. At the moment, following libraries are supported:

- [Chart.js](http://www.chartjs.org/) (Lines, Doughnuts)

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

[](#installation)

```
curl -s https://getcomposer.org/installer | php
php composer.phar install

```

Module Installation
-------------------

[](#module-installation)

### Add to composer.json

[](#add-to-composerjson)

```
"phpro/zf-charts": "~0.1"

```

### Add module to application.config.php

[](#add-module-to-applicationconfigphp)

```
return array(
    'modules' => array(
        'AssetManager',
        'Phpro\Chart',
        // other libs...
    ),
    // Other config
);
```

ChartJS
-------

[](#chartjs)

The API of the PHP library works exactly the same as the javascript API. More information about the configurable options can be found in the [official documentation](http://www.chartjs.org/docs/)

### Line chart

[](#line-chart)

```
$options = new LineOptions(['animation' => false]);
$data = new LineData();
$data->setLabels(['January', 'February', 'March', 'April', 'May', 'June', 'July']);
$data->addDataset(new LineDataset([
    'label' => 'My first dataset',
    'fillColor' => 'rgba(220,220,220,0.2)',
    'strokeColor' => 'rgba(220,220,220,1)',
    'pointColor' => 'rgba(220,220,220,1)',
    'pointStrokeColor' => '#fff',
    'pointHighlightFill' => '#fff',
    'pointHighlightStroke' => 'rgba(220,220,220,1)',
    'data' => [65, 59, 80, 81, 56, 55, 40]
]));
$chart = new LineChart($options, $data);
```

Doughnut chart
--------------

[](#doughnut-chart)

```
$options = new DoughnutOptions(['animation' => false]);
$data = new DoughnutData();
$data->addDataset(new DoughnutDataset([
    'label' => 'label 1',
    'value' => 50,
    'color' => 'green',
    'highlight' => 'green',
]));
$data->addDataset(new DoughnutDataset([
    'label' => 'label 2',
    'value' => 50,
    'color' => 'red',
    'highlight' => 'red',
]));
$chart = new DoughnutChart($options, $data);
```

View Helper
-----------

[](#view-helper)

```

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity46

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

4224d ago

### Community

Maintainers

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

---

Top Contributors

[![veewee](https://avatars.githubusercontent.com/u/1618158?v=4)](https://github.com/veewee "veewee (28 commits)")

### Embed Badge

![Health badge](/badges/phpro-zf-charts/health.svg)

```
[![Health](https://phpackages.com/badges/phpro-zf-charts/health.svg)](https://phpackages.com/packages/phpro-zf-charts)
```

###  Alternatives

[zf-commons/zfc-base

A set of genetic (abstract) classes which are commonly used across multiple modules.

1441.1M25](/packages/zf-commons-zfc-base)[snapshotpl/zf-snap-geoip

MaxMind GeoIP Module for Zend Framework 2

1512.9k](/packages/snapshotpl-zf-snap-geoip)[bitweb/zf2-cron-module

BitWeb ZF2 module for cron.

1341.6k](/packages/bitweb-zf2-cron-module)

PHPackages © 2026

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