How erikgartner/dtree works
dTree is a browser-side D3 library for visualizing hierarchical data with multiple parents, including marriages. A consumer supplies data and options to dTree.init; preprocessing converts people and marriages into a D3 hierarchy, then the builder measures nodes, lays out the graph, and renders SVG. The returned controls zoom and pan the view, while rendering dispatches configurable callbacks. The map reflects the two sampled runtime modules and README-documented D3/lodash dependencies; the external viewer is a separate product and is not part of this library’s runtime.
Main entry points: dtree.js dTree API · builder.js Tree builder
Components 6
API and preparation
- dTree API
src/dtree.js - Data preprocessing
src/dtree.js
Layout and rendering
- Tree builder
src/builder.js
Other components
- Library consumer
- D3 runtime
- Lodash runtime
Connections 7
- Library consumer → dTree API: supplies data
README.md - dTree API → Data preprocessing: preprocesses data
src/dtree.js - dTree API → Tree builder: creates and renders
src/dtree.js - Tree builder → D3 runtime: lays out and draws
src/builder.js - dTree API → D3 runtime: controls zoom
src/dtree.js - Tree builder → Lodash runtime: uses helpers
src/builder.js - dTree API → Library consumer: returns zoom controls
src/dtree.js