{"id":20170302,"url":"https://github.com/marcodpt/graph","last_synced_at":"2025-07-23T06:33:39.544Z","repository":{"id":111252272,"uuid":"381141753","full_name":"marcodpt/graph","owner":"marcodpt","description":"A graph element based on cytoscape.js","archived":false,"fork":false,"pushed_at":"2022-05-11T17:52:17.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-03T04:15:53.650Z","etag":null,"topics":["cytoscape","cytoscapejs","dom","element","graph"],"latest_commit_sha":null,"homepage":"https://marcodpt.github.io/h/?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmarcodpt%2Fgraph%2Fsamples.js","language":"JavaScript","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/marcodpt.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}},"created_at":"2021-06-28T19:33:33.000Z","updated_at":"2022-05-11T17:54:20.000Z","dependencies_parsed_at":"2023-03-13T13:43:03.822Z","dependency_job_id":null,"html_url":"https://github.com/marcodpt/graph","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/marcodpt/graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodpt%2Fgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodpt%2Fgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodpt%2Fgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodpt%2Fgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcodpt","download_url":"https://codeload.github.com/marcodpt/graph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodpt%2Fgraph/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266631486,"owners_count":23959419,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["cytoscape","cytoscapejs","dom","element","graph"],"created_at":"2024-11-14T01:18:12.934Z","updated_at":"2025-07-23T06:33:39.502Z","avatar_url":"https://github.com/marcodpt.png","language":"JavaScript","readme":"# graph\n\u003e A graph element based on [cytoscape.js](https://cytoscape.org/)\n\n[Live demo](https://marcodpt.github.io/h/?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fmarcodpt%2Fgraph%2Fsamples.js)\n\n## Usage\n```js\nimport graph from 'https://cdn.jsdelivr.net/gh/marcodpt/graph/index.js'\n\ndocument.body.appendChild(graph({\n  data: [\n    {\n      id: 'v1',\n      label: 'John',\n      color: 'black',\n      info: 'I am john!'\n    }, {\n      id: 'v2',\n      label: 'Paul',\n      color: 'black',\n      info: 'I am Paul!'\n    }, {\n      id: 'v3',\n      label: 'Jimmy',\n      color: 'black',\n      info: 'I am Jimmy!'\n    }, {\n      id: 'v4',\n      label: 'David',\n      color: 'black',\n      info: 'I am David!'\n    }, {\n      id: 'e1',\n      label: 'John -\u003e Paul',\n      color: 'blue',\n      info: 'Cold!',\n      source: 'v1',\n      target: 'v2'\n    }, {\n      id: 'e2',\n      label: 'Paul -\u003e Jimmy',\n      color: 'yellow',\n      info: 'Warm!',\n      source: 'v2',\n      target: 'v3'\n    }, {\n      id: 'e3',\n      label: 'Paul -\u003e David',\n      color: 'red',\n      info: 'Very close!',\n      source: 'v2',\n      target: 'v4'\n    }\n  ]\n}))\n```\n\n## Params\n - array `data`: array of objects with `edges` and `vertices` of your graph\n   - object items represent `vertices` or `edges`:\n     - string `id`\n     - string `label`\n     - string `color`\n     - Promise string `info`\n     - string `source`: only for `edges`, the `vertice` source\n     - string `target`: only for `edges`, the `vertice` target\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcodpt%2Fgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcodpt%2Fgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcodpt%2Fgraph/lists"}