{"id":16881647,"url":"https://github.com/benbjohnson/miniviz","last_synced_at":"2026-05-16T20:36:48.545Z","repository":{"id":66318090,"uuid":"12383955","full_name":"benbjohnson/miniviz","owner":"benbjohnson","description":"A simplified interface to GraphViz for laying out clusters, nodes and edges.","archived":false,"fork":false,"pushed_at":"2013-09-15T20:21:30.000Z","size":150,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-20T22:47:35.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/benbjohnson.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":"2013-08-26T16:25:56.000Z","updated_at":"2014-04-27T01:08:20.000Z","dependencies_parsed_at":"2023-02-20T02:30:41.414Z","dependency_job_id":null,"html_url":"https://github.com/benbjohnson/miniviz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benbjohnson/miniviz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fminiviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fminiviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fminiviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fminiviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benbjohnson","download_url":"https://codeload.github.com/benbjohnson/miniviz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fminiviz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33118137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-13T16:04:37.949Z","updated_at":"2026-05-16T20:36:48.530Z","avatar_url":"https://github.com/benbjohnson.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"miniviz\n=======\n\n\u003e A simplified interface to GraphViz for laying out clusters, nodes and edges.\n\n\n## Overview\n\nGraphViz is an awesome tool.\nIt makes amazing graph layouts given just nodes, edges and clusters.\nUnfortunately, there are several reasons why it's output is unusable for modern UIs:\n\n1. The unit of measure is in points and inches instead of pixels.\n\n2. A traditional cartesian coordinate system is used (instead of an inverted-y system like most UIs use).\n\n3. GraphViz has its own `dot` language which is not easy for newcomers.\n\n\n## How is Miniviz Different?\n\nMiniviz tries to simplify a common use case of wanting to layout a list of nodes and a list of edges and return coordinate information.\nCoordinate information is returned as standard \"x\" and \"y\" in pixels with y incremented as it moves down the screen.\nMiniviz also gives a simple interface of using basic hashes for inputing nodes and edges.\n\n\n## Usage\n\nTo use Miniviz, you can take some nodes and edges and create a graph with them like this:\n\n```ruby\nnodes = [\n  {id:\"A\"},\n  {id:\"B\"},\n  {id:\"C\"}\n]\n\nedges = [\n  {source:\"A\", target:\"B\"},\n  {source:\"B\", target:\"C\"},\n]\n\ngraph = Miniviz::Graph.new(nodes:nodes, edges:edges)\n\n# Output to normalized JSON or Hash\ngraph.to_json()  # =\u003e \"{\\\"nodes\\\":[{\\\"id\\\":\\\"A\\\",\\\"x\\\":20,\\\"y\\\":30}, ...], \\\"edges\\\":[...]}\"\n\n# Output to normalized SVG.\ngraph.to_svg()\n```\n\nNow you can use Graphviz positional data for your D3.js visualizations or whatever you can think of.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbjohnson%2Fminiviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenbjohnson%2Fminiviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbjohnson%2Fminiviz/lists"}