{"id":18479376,"url":"https://github.com/yggverse/graph-php","last_synced_at":"2025-10-08T19:25:23.850Z","repository":{"id":187210777,"uuid":"676208257","full_name":"YGGverse/graph-php","owner":"YGGverse","description":"PHP library to build JS-less graphs","archived":false,"fork":false,"pushed_at":"2024-01-24T01:06:18.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-21T11:16:20.604Z","etag":null,"topics":["charts","graphs","js-less","php","php-calendar","php-charts","php-graphs"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YGGverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-08T17:09:29.000Z","updated_at":"2023-08-09T12:35:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"427e351d-f391-4ad6-b583-467bfea02242","html_url":"https://github.com/YGGverse/graph-php","commit_stats":null,"previous_names":["yggverse/graph-php"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/YGGverse/graph-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YGGverse%2Fgraph-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YGGverse%2Fgraph-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YGGverse%2Fgraph-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YGGverse%2Fgraph-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YGGverse","download_url":"https://codeload.github.com/YGGverse/graph-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YGGverse%2Fgraph-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000704,"owners_count":26082805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["charts","graphs","js-less","php","php-calendar","php-charts","php-graphs"],"created_at":"2024-11-06T12:14:23.627Z","updated_at":"2025-10-08T19:25:23.843Z","avatar_url":"https://github.com/YGGverse.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graph-php\nPHP library to build JS-less graphs\n\n### Calendar\n\nBuild calendar graphs with unlimited chart layers\n\n#### [Month](https://github.com/YGGverse/graph-php/blob/main/src/Calendar/Month.php)\n\n![yggverse-graph-php-example](https://github.com/YGGverse/graph-php/assets/108541346/bbac7626-1f0b-476c-b154-f8a6f2933530)\n\n##### Examples\n\n * [YGGstate](https://github.com/YGGverse/YGGstate) - Yggdrasil Network Explorer\n * [HLState](https://github.com/YGGverse/HLState) -  Web Monitor for Half-Life Servers\n\n##### Usage\n\n###### Server-side\n\n```\n// Init current month\n$calendarMonth = new Yggverse\\Graph\\Calendar\\Month(\n  time(),       // optional, custom timestamp\n  CAL_GREGORIAN // optional, define the calendar type (https://www.php.net/manual/en/calendar.constants.php)\n);\n\n// Let's build some random graphs for each day in this month\nforeach ($calendarMonth-\u003egetNodes() as $day =\u003e $node)\n{\n  // Register first layer data\n  $calendarMonth-\u003eaddNode(\n    $day,          // required, number of day, on this example we are processing all of days in the initiated month\n    rand(1, 1000), // required, set some digit value for this day and current layer\n    'label 0',     // optional, label text that could be displayed on element over\n    'class-name',  // optional, customize output with CSS class\n    0              // optional, define chart layer if you want to build multiple charts in single day case\n                   // e.g. 1, 2, 3... or some keyword. first layer has 0 index by default.\n  );\n\n  // Make second layer for hourly stats in tis day with few variables\n  for ($hour = 0; $hour \u003c 24; $hour++)\n  {\n    // To build independent chart layer, make sure that layer attribute increased, for example to 1\n    $calendarMonth-\u003eaddNode($day, rand(0, 1000), 'my hourly label 1, 'my-class-name-1', 1);\n    $calendarMonth-\u003eaddNode($day, rand(0, 1000), 'my hourly label 2, 'my-class-name-2', 1);\n  }\n}\n```\n\n###### Client-side\n\n * [CSS](https://github.com/YGGverse/YGGstate/blob/main/src/public/assets/theme/default/css/yggverse/graph/calendar/month.css)\n * [PHP/HTML](https://github.com/YGGverse/YGGstate/blob/main/src/public/index.php)\n\nTo make your own implementation, play with:\n\n```\nvar_dump(\n  $calendarMonth-\u003egetNodes()\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyggverse%2Fgraph-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyggverse%2Fgraph-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyggverse%2Fgraph-php/lists"}