{"id":13725086,"url":"https://github.com/rsms/graphviz","last_synced_at":"2025-06-16T23:36:27.266Z","repository":{"id":47945471,"uuid":"218870527","full_name":"rsms/graphviz","owner":"rsms","description":"Graphviz web app","archived":false,"fork":false,"pushed_at":"2022-12-04T18:27:40.000Z","size":646,"stargazers_count":125,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-13T05:48:06.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rsms.me/graphviz/","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/rsms.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}},"created_at":"2019-10-31T22:17:32.000Z","updated_at":"2025-06-01T00:38:30.000Z","dependencies_parsed_at":"2023-01-23T06:30:25.232Z","dependency_job_id":null,"html_url":"https://github.com/rsms/graphviz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rsms/graphviz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fgraphviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fgraphviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fgraphviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fgraphviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsms","download_url":"https://codeload.github.com/rsms/graphviz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fgraphviz/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260261722,"owners_count":22982699,"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","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":[],"created_at":"2024-08-03T01:02:12.592Z","updated_at":"2025-06-16T23:36:27.240Z","avatar_url":"https://github.com/rsms.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Graphviz in the browser\n\nProvides a very small JS library\n\n- Exposes a global variable `graphvis`\n- Very fast\n- Runs graphviz compiled as WebAssembly in a background Worker thread\n- Timeouts for preventing run-away \"huge graph\" computations\n\n\n## Usage\n\n```html\n\u003chead\u003e\n  \u003cmeta charset=\"utf-8\"\u003e\n  \u003cscript src=\"https://rsms.me/graphviz/graphviz.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003cscript\u003e\ngraphviz.layout(`\ndigraph {\n  Hello -\u003e World\n  Hej -\u003e Hello\n  Värld -\u003e World -\u003e Hej\n}\n`).then(svg =\u003e {\n  document.body.innerHTML = svg\n})\n\u003c/script\u003e\n\u003c/body\u003e\n```\n\n## API\n\n```ts\nnamespace graphviz {\n  // Version string of this library (e.g. \"1.2.3\")\n  export const version :string\n\n  // Error raised on timeout\n  export const TimeoutError :Error\n\n  // layout performs Graphviz layout\n  export function layout(\n    source   :string,  // dot source code\n    format?  :Format,  // Output format. Defaults to \"svg\"\n    engine?  :Engine,  // Default engine type. Defaults to \"dot\"\n    timeout? :number,  // Optional timeout in milliseconds\n  ) :Promise\u003cstring\u003e\n\n  // Output formats\n  export type Format = \"dot\"\n                     | \"json\"\n                     | \"json0\"\n                     | \"plain\"\n                     | \"plain-ext\"\n                     | \"ps\"\n                     | \"ps2\"\n                     | \"svg\"\n                     | \"xdot\"\n\n  // Layout engine types\n  export type Engine = \"circo\"  // for circular layout of graphs\n                     | \"dot\"    // for drawing directed graphs\n                     | \"fdp\"    // for drawing undirected graphs\n                     | \"neato\"  // for drawing undirected graphs\n                     | \"osage\"  // for drawing large undirected graphs\n                     | \"twopi\"  // for radial layouts of graphs\n}\n```\n\n\n## Notes\n\nThis is essentially a wrapper around [viz.js](https://github.com/mdaines/viz.js).\n\nSee [Graphviz documentation here](https://www.graphviz.org/doc/info/attrs.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fgraphviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsms%2Fgraphviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fgraphviz/lists"}