PHPackages                             yggverse/graph - 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. yggverse/graph

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

yggverse/graph
==============

PHP library to build JS-less graphs

0.2.2(2y ago)033MITPHPPHP &gt;=8.1

Since Aug 9Pushed 2y ago2 watchersCompare

[ Source](https://github.com/YGGverse/graph-php)[ Packagist](https://packagist.org/packages/yggverse/graph)[ RSS](/packages/yggverse-graph/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

graph-php
=========

[](#graph-php)

PHP library to build JS-less graphs

### Calendar

[](#calendar)

Build calendar graphs with unlimited chart layers

#### [Month](https://github.com/YGGverse/graph-php/blob/main/src/Calendar/Month.php)

[](#month)

[![yggverse-graph-php-example](https://private-user-images.githubusercontent.com/108541346/299138252-bbac7626-1f0b-476c-b154-f8a6f2933530.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUwMTIzMjMsIm5iZiI6MTc3NTAxMjAyMywicGF0aCI6Ii8xMDg1NDEzNDYvMjk5MTM4MjUyLWJiYWM3NjI2LTFmMGItNDc2Yy1iMTU0LWY4YTZmMjkzMzUzMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwMVQwMjUzNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iOWRmMWYwY2JjZDEyODE5MjE3MWMyZDYzY2Q2YzRmNTRmNThlMGY3Y2M3MmU1MTc5ZWZiZmQ1ZDM4OGRlN2Q4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.OnHfqBdaY_N6RZvdZo-93cXlSF9LhhwTVLRleiLxAr8)](https://private-user-images.githubusercontent.com/108541346/299138252-bbac7626-1f0b-476c-b154-f8a6f2933530.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUwMTIzMjMsIm5iZiI6MTc3NTAxMjAyMywicGF0aCI6Ii8xMDg1NDEzNDYvMjk5MTM4MjUyLWJiYWM3NjI2LTFmMGItNDc2Yy1iMTU0LWY4YTZmMjkzMzUzMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwMVQwMjUzNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iOWRmMWYwY2JjZDEyODE5MjE3MWMyZDYzY2Q2YzRmNTRmNThlMGY3Y2M3MmU1MTc5ZWZiZmQ1ZDM4OGRlN2Q4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.OnHfqBdaY_N6RZvdZo-93cXlSF9LhhwTVLRleiLxAr8)

##### Examples

[](#examples)

- [YGGstate](https://github.com/YGGverse/YGGstate) - Yggdrasil Network Explorer
- [HLState](https://github.com/YGGverse/HLState) - Web Monitor for Half-Life Servers

##### Usage

[](#usage)

###### Server-side

[](#server-side)

```
// Init current month
$calendarMonth = new Yggverse\Graph\Calendar\Month(
  time(),       // optional, custom timestamp
  CAL_GREGORIAN // optional, define the calendar type (https://www.php.net/manual/en/calendar.constants.php)
);

// Let's build some random graphs for each day in this month
foreach ($calendarMonth->getNodes() as $day => $node)
{
  // Register first layer data
  $calendarMonth->addNode(
    $day,          // required, number of day, on this example we are processing all of days in the initiated month
    rand(1, 1000), // required, set some digit value for this day and current layer
    'label 0',     // optional, label text that could be displayed on element over
    'class-name',  // optional, customize output with CSS class
    0              // optional, define chart layer if you want to build multiple charts in single day case
                   // e.g. 1, 2, 3... or some keyword. first layer has 0 index by default.
  );

  // Make second layer for hourly stats in tis day with few variables
  for ($hour = 0; $hour < 24; $hour++)
  {
    // To build independent chart layer, make sure that layer attribute increased, for example to 1
    $calendarMonth->addNode($day, rand(0, 1000), 'my hourly label 1, 'my-class-name-1', 1);
    $calendarMonth->addNode($day, rand(0, 1000), 'my hourly label 2, 'my-class-name-2', 1);
  }
}

```

###### Client-side

[](#client-side)

- [CSS](https://github.com/YGGverse/YGGstate/blob/main/src/public/assets/theme/default/css/yggverse/graph/calendar/month.css)
- [PHP/HTML](https://github.com/YGGverse/YGGstate/blob/main/src/public/index.php)

To make your own implementation, play with:

```
var_dump(
  $calendarMonth->getNodes()
);

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

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

Every ~42 days

Total

5

Last Release

846d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/67b0f652ebac064d26ca06ba5fd4271fab0ac5482d6c2d4865b8f3697721bc31?d=identicon)[d47081](/maintainers/d47081)

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

---

Top Contributors

[![d47081](https://avatars.githubusercontent.com/u/108541346?v=4)](https://github.com/d47081 "d47081 (3 commits)")

---

Tags

chartsgraphsjs-lessphpphp-calendarphp-chartsphp-graphs

### Embed Badge

![Health badge](/badges/yggverse-graph/health.svg)

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

PHPackages © 2026

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