# erikbrinkman/d3-dag

Layout algorithms for visualizing directed acyclic graphs

Repository: https://github.com/erikbrinkman/d3-dag
Canonical: https://ross.abutalabs.com/products/d3-dag
Homepage: https://erikbrinkman.github.io/d3-dag/
Language: TypeScript
License: MIT
License Family: permissive
Topics: d3, graph, typescript, dag, directed-acyclic-graph, graph-layout, javascript, sugiyama, visualization
Last push: 2026-08-01T15:11:24+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 95, release rhythm 80, longevity 100
- inputs: {"age_days": 2980, "days_push": 32, "days_rel": 59, "gap_med": 41.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1516, forks 93 (observed 2026-08-28T04:04:56.595816+00:00)

## What it is
A TypeScript-first JavaScript library providing layered layout algorithms for visualizing directed acyclic graphs (DAGs). It offers a dagre-compatible API plus advanced algorithms like optimal edge crossing minimization, Zherebko, and Grid layouts, and works as a drop-in layout engine for React Flow.

## Use cases
- layout directed acyclic graphs for visualization in the browser
- replace dagre as the layout engine in React Flow
- compute layered sugiyama layouts with minimal edge crossings
- render dependency trees or pipelines with d3
- auto-position nodes in a flowchart or workflow diagram

## When to choose
- you need DAG layout in JavaScript/TypeScript with a small bundle size
- you want better layouts than dagre, such as optimal decrossing or Zherebko/Grid algorithms
- you use React Flow and want a drop-in dagre replacement
- you value full TypeScript type safety in a graph layout library

## When to avoid
- you need layouts for cyclic graphs rather than DAGs
- you need compound/clustered graph layout or very large general graph layouts where elkjs is more capable
- you need a non-JavaScript environment

## Facets
- artifact type: library
- maturity: active
- function: data-visualization, graphics
- domain: data-visualization, web-development, frontend
- platform: browser, cross-platform
- tags: d3, dag, graph-layout, sugiyama, typescript, react-flow, dagre-compatible, nodejs, web-server

## Member repositories
- erikbrinkman/d3-dag (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:56.595816+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:32:06.035514+00:00, confidence not recorded.
  - readme: https://github.com/erikbrinkman/d3-dag (fetched 2026-08-28T04:04:56.595816+00:00, sha bb3ab890227b)
  - homepage: https://erikbrinkman.github.io/d3-dag/ (fetched 2026-08-29T11:35:45.021924+00:00, sha e98fcc90386b)
  - registry_npm: https://registry.npmjs.org/d3-dag (fetched 2026-08-29T11:35:45.031927+00:00, sha 97d56bd2ec90)
- Data as of 2026-08-30T08:39:29.467469+00:00.
