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 today

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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMxMzg4MDIsIm5iZiI6MTc4MzEzODUwMiwicGF0aCI6Ii8xMDg1NDEzNDYvMjk5MTM4MjUyLWJiYWM3NjI2LTFmMGItNDc2Yy1iMTU0LWY4YTZmMjkzMzUzMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzA0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcwNFQwNDE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- [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

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

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

892d ago

### Community

Maintainers

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

![](https://avatars.githubusercontent.com/u/129769985?v=4)[YGGverse](/maintainers/YGGverse)[@YGGverse](https://github.com/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)
