PHPackages                             jasonroyle/li3\_highcharts - 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. jasonroyle/li3\_highcharts

ActiveLithium-library[Utility &amp; Helpers](/categories/utility)

jasonroyle/li3\_highcharts
==========================

Highcharts helper for Lithium

0.1.1(11y ago)0108MITPHPPHP &gt;=5.4.0

Since Feb 17Pushed 11y ago5 watchersCompare

[ Source](https://github.com/jasonroyle/li3_highcharts)[ Packagist](https://packagist.org/packages/jasonroyle/li3_highcharts)[ RSS](/packages/jasonroyle-li3-highcharts/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

Highcharts Helper for Lithium
=============================

[](#highcharts-helper-for-lithium)

### Composer

[](#composer)

```
composer require jasonroyle/li3_highcharts

```

### Git

[](#git)

```
git submodule add https://github.com/IngeniumIDS/li3_highcharts.git libraries/li3_highcharts

```

Enable the Library
------------------

[](#enable-the-library)

Make the application aware of the library by adding the following to `app/config/bootstrap/libraries.php`.

```
Libraries::add('li3_highcharts');
```

Finally load the jQuery and highcharts JavaScript libraries between the `` and `` HTML tags at the top of the layout.

```
echo $this->html->script([
	'http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js',
	'http://code.highcharts.com/highcharts.js'
]);
```

Usage
-----

[](#usage)

The helper has seven functions that generate different types of charts (area, areaSpline, bar, column, line, pie and spline). These functions accept three parameters (title, data and options).

Parameter formatting:

- The title should either be a string or null.
- The data for the area, areaSpline, bar, column, line and spline functions is a PHP array version of the [series.data JavaScript array](http://api.highcharts.com/highcharts#series.data).
- The data for the pie function is an associative array where the keys are the series names and the values are integers.
- The options is a PHP array version of the [JavaScript object](http://api.highcharts.com/highcharts) that would normally be passed to the highcharts JavaScript function.

Some options have been added to make a few things easier:

- Series names can be set as the keys of the data array.
- Values of the data array that aren't arrays are applied to all series as options.
- The pointStart option can be set to any [PHP supported date and time format](http://www.php.net/manual/en/datetime.formats.php).
- The pointInterval option can be set to second, minute, hour, day or week.

Area chart:

```
echo $this->highcharts->area(
	'Daily Page Clicks',
	[
		'pointStart' => '28 August 2013',
		'pointInterval' => 'day',
		'Home' => ['data' => [1,3,2,7,5,4,6,2]],
		'Contact' => ['data' => [0,1,1,4,5,0,4,1]]
	],
	[
		'xAxis' => ['type' => 'datetime'],
		'yAxis' => ['title' => ['text' => 'Clicks']]
	]
);
```

Pie chart:

```
echo $this->highcharts->pie(
	'Browser Share',
	[
		'Chrome' => 61,
		'Safari' => 38,
		'IE' => 6,
		'Others' => 4,
		'Opera' => 3
	]
);
```

Anonymous JavaScript functions can be used.

Area spline chart:

```
echo $this->highcharts->areaSpline(
	'Daily Page Clicks',
	[
		'pointStart' => '(function(){return Date.UTC(2013,7,28,0,0,0);})()',
		'pointInterval' => '(function(){return 24 * 3600 * 1000;})()',
		'Home' => ['data' => [1,3,2,7,5,4,6,2]],
		'Contact' => ['data' => [0,1,1,4,5,0,4,1]]
	],
	[
		'xAxis' => ['type' => 'datetime'],
		'yAxis' => ['title' => ['text' => 'Clicks']]
	]
);
```

The helper has one more function (chart) which can be used with only the options parameter to allow full configuration.

Spline chart:

```
echo $this->highcharts->chart([
	'chart' => ['type' => 'spline'],
	'title' => ['text' => 'Daily Page Clicks'],
	'xAxis' => ['type' => 'datetime'],
	'yAxis' => ['title' => ['text' => 'Clicks']],
	'series' => [
		'pointStart' => '28 August 2013',
		'pointInterval' => 'day',
		'Home' => ['data' => [1,3,2,7,5,4,6,2]],
		'Contact' => ['data' => [0,1,1,4,5,0,4,1]]
	]
]);
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

4102d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64b3c78db28fb95fbb5efd49d1fba515113af69f602a3de6f22f08a96641d9fe?d=identicon)[jasonroyle](/maintainers/jasonroyle)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/jasonroyle-li3-highcharts/health.svg)

```
[![Health](https://phpackages.com/badges/jasonroyle-li3-highcharts/health.svg)](https://phpackages.com/packages/jasonroyle-li3-highcharts)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3376.6k](/packages/starcitizentools-citizen-skin)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

19251.4k3](/packages/civicrm-civicrm-drupal-8)[altis/core

Core module for Altis

19228.0k3](/packages/altis-core)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5721.7k4](/packages/pfefferle-wordpress-activitypub)

PHPackages © 2026

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