PHPackages                             jaxon-php/jaxon-flot - 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. jaxon-php/jaxon-flot

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

jaxon-php/jaxon-flot
====================

Javascript charts for Jaxon with the Flot library

v5.3.3(3mo ago)0246↓84.6%BSD-2-ClausePHPPHP &gt;=8.1

Since Jul 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/jaxon-php/jaxon-flot)[ Packagist](https://packagist.org/packages/jaxon-php/jaxon-flot)[ Docs](https://github.com/jaxon-php/jaxon-flot)[ RSS](/packages/jaxon-php-jaxon-flot/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (2)Versions (20)Used By (0)

Javascript charts for Jaxon with Flot
=====================================

[](#javascript-charts-for-jaxon-with-flot)

Javascript charts for Jaxon with the Flot library.

See the plugin in action with sample code.

-
-
-

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

[](#installation)

Install this package with Composer.

```
"require": {
    "jaxon-php/jaxon-flot": "^5.1"
}
```

Draw graphs
-----------

[](#draw-graphs)

Create a new card to be displayed in a div with a given id, eg. "flot-container".

```
    $card = $response->flot->card('flot-container');
```

Add a graph in the card, and set its parameters.

```
    $graph = $card->graph(['label' => 'Flot example', 'lines' => ['show' => true]]);
```

The options are defined in [the API docs](https://github.com/flot/flot/blob/master/API.md#plot-options).

Multiple data series can be added to a graph.

Each series can be defined using an array of points.

```
    $graph->series()->points([[0, 3], [4, 8], [8, 5], [9, 13]]);
```

Or a javascript loop expression. The loop goes from a start to an end value, with the specified step. The last parameter is a Javascript function defined in the app, which takes a point as parameter and returns the corresponding value.

```
    $graph->series()->loop(0, 14, 0.5, 'Math.sqrt');
```

The X axis and Y axis options can also be set. Multiple X axis and Y axis can be added. For each axis, the labels can be optionally set either with an array of points, or with a loop expression.

```
    $card->xaxis()->options([
        // First X axis options.
    ])->points($ticks);
    $card->xaxis()->options([
        // Second X axis options.
    ])->loop(0, 16, 1, 'flot.xaxis.label');
```

Set the dimensions of the card.

```
    $card->width('600px')->height('300px');
```

Finally, draw the graph.

```
    $response->flot->draw($card);
```

You can add as many graphs as you need in a single card, and you can draw many cards in a single page.

Draw a pie
----------

[](#draw-a-pie)

Drawing a pie chart requires the pie plugin for Flot to be loaded. Call this PHP code before loading the page, or add the Flot pie plugin manually.

```
jaxon()->di()->g(FlotPlugin::class)->usePie(true);
```

Create a new card to be displayed in a div with a given id, eg. "flot-container".

```
    $card = $response->flot->card('flot-container');
```

Set the card options.

```
    $card->options([
        'series' => [
            'pie' => [
                'show' => true,
            ],
        ],
    ]);
```

Add the pie to the card

```
    $card->pie()->slices([
        [3, 'Pt 1'],
        [8, 'Pt 2'],
        [5, 'Pt 3'],
        [13, 'Pt 4'],
    ]);
```

Finally, draw the graph.

```
    $response->flot->draw($card);
```

Only one pie can be added to a card.

Contribute
----------

[](#contribute)

- Issue Tracker: github.com/jaxon-php/jaxon-flot/issues
- Source Code: github.com/jaxon-php/jaxon-flot

License
-------

[](#license)

The project is licensed under the BSD license.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance84

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

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

Recently: every ~2 days

Total

19

Last Release

92d ago

Major Versions

v0.1.2 → v1.0.02017-07-25

v1.0.1 → v3.0.02019-11-20

v3.1.x-dev → v4.0.02022-08-08

v4.x-dev → v5.0.02025-06-24

PHP version history (2 changes)v5.0.0PHP &gt;=8.0

v5.0.2PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![feuzeu](https://avatars.githubusercontent.com/u/15174329?v=4)](https://github.com/feuzeu "feuzeu (34 commits)")

---

Tags

phpjavascriptajaxchartgraphxajaxJaxonplotflot

### Embed Badge

![Health badge](/badges/jaxon-php-jaxon-flot/health.svg)

```
[![Health](https://phpackages.com/badges/jaxon-php-jaxon-flot/health.svg)](https://phpackages.com/packages/jaxon-php-jaxon-flot)
```

###  Alternatives

[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73147.2k29](/packages/jaxon-php-jaxon-core)

PHPackages © 2026

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