PHPackages                             okvpn/graph-widget-bundle - 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. okvpn/graph-widget-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

okvpn/graph-widget-bundle
=========================

Build graph bases on database query

0403PHP

Since Jul 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/okvpn/oro-graph-widget)[ Packagist](https://packagist.org/packages/okvpn/graph-widget-bundle)[ RSS](/packages/okvpn-graph-widget-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

GraphWidgetBundle for OroPlatform
=================================

[](#graphwidgetbundle-for-oroplatform)

This OroPlatform bundle provider functionality to build line graph based on custom native sql query.

Install
-------

[](#install)

Install using [composer](https://getcomposer.org/) following the official Composer [documentation](https://getcomposer.org/download/):

1. Install via composer:

```
composer require okvpn/graph-widget-bundle

```

2. Run oro platform update

```
# symfony 3
rm -r var/cache/*
php bin/console oro:platform:update --force

# symfony 2
rm -r app/cache/*
php app/console oro:platform:update --force

```

Configure
---------

[](#configure)

1. Create database integration.

**Note:** it's better to create a read-only database user. Dashboard widget use separate connection for database.

[![1 img](src/Resources/docs/1.png)](src/Resources/docs/1.png)

2. Add widget to dashboard.

[![2 img](src/Resources/docs/2.png)](src/Resources/docs/2.png)

3. Update widget configuration

[![3 img](src/Resources/docs/3.png)](src/Resources/docs/3.png)

SQL Format
----------

[](#sql-format)

You can build line or multi-line plot. The data will be fetch from the columns: "x", "y", "line". Where: "x" - x-axis, "y" - y-axis and "line" - grouping column to build multi-line plot.

### Example of line plot.

[](#example-of-line-plot)

```
SELECT avg_status as y, created_at as x
FROM okvpn_radar
WHERE time > extract(epoch from now()) - 86400
ORDER BY id DESC LIMIT 1000;
```

*Results of execute sql query*

xy0.0052018-06-12 18:42:000.0132018-06-12 18:27:000.0302018-06-12 18:12:000.0562018-06-12 17:57:000.0812018-06-12 17:42:00[![4 img](src/Resources/docs/4.png)](src/Resources/docs/4.png)

### Example of multi-line plot.

[](#example-of-multi-line-plot)

```
SELECT tmp.x, tmp.y, tmp.line FROM (
  SELECT ROUND(AVG(avg_status), 3) AS y, created_at::date AS x, 'AVG' AS line
  FROM okvpn_radar
  WHERE created_at > now() - INTERVAL '50 day' AND type = 'UMMN' GROUP BY x
  UNION ALL (
    SELECT ROUND(MAX(avg_status), 3) AS y, created_at::date AS x, 'MAX' AS line
    FROM okvpn_radar
    WHERE created_at > now() - INTERVAL '50 day' AND type = 'UMMN' GROUP BY x
  )
) tmp ORDER BY tmp.x DESC;
```

*Results of execute sql query*

xyline2018-06-120.157AVG2018-06-120.484MAX2018-06-111.164MAX2018-06-110.478AVG2018-06-100.018MAX2018-06-100.004AVG[![5 img](src/Resources/docs/5.png)](src/Resources/docs/5.png)

Permissions
-----------

[](#permissions)

You can disable update sql query using ACL permission `okvpn_sql_query`.

[![6 img](src/Resources/docs/6.png)](src/Resources/docs/6.png)

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/72ab45c38dd8963c58e34948277405642f3e498f5ffc7508cea6e51a5dcdd24f?d=identicon)[vtsykun](/maintainers/vtsykun)

---

Top Contributors

[![vtsykun](https://avatars.githubusercontent.com/u/21358010?v=4)](https://github.com/vtsykun "vtsykun (6 commits)")

### Embed Badge

![Health badge](/badges/okvpn-graph-widget-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/okvpn-graph-widget-bundle/health.svg)](https://phpackages.com/packages/okvpn-graph-widget-bundle)
```

PHPackages © 2026

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