DataViz.Layout.TidyDag
- Package
- purescript-hylograph-layout
- Repository
- afcondon/purescript-hylograph-layout
DataViz.Layout.TidyDag
Layout for shallow, sparse DAGs (build graphs, dependency cones):
prune the DAG to a spanning tree, lay the tree out with the
Reingold–Tilford Hierarchy.Tree, then hand back the pruned edges
as cross-links for the renderer to draw faint.
The pruning heuristic: each node's tree-parent is its
LONGEST-PATH parent — the dependent that determines the node's
layer — so the tree backbone agrees with the DAG's natural stages
and cross-links stay short and lateral. Ties break by the caller's
mass (e.g. transitive leaf mass), then lexically for determinism.
Edges are parent depends-on child (build: target → input), so
roots are the goals and leaves are the sources. Self-edges are
ignored; cycles cannot capture the depth pass (it is a bounded
fixpoint), and back-edges simply become cross-links.
#TidyDagLayout Source
type TidyDagLayout = { links :: Array PlacedLink, nodes :: Array PlacedNode }#tidyDag Source
tidyDag :: TidyDagConfig -> { edges :: Array DagEdge, mass :: String -> Number, roots :: Array String } -> TidyDagLayoutLay out a DAG. roots are the entry points (goals); ids appearing
only in edges are picked up automatically. mass breaks
tree-parent ties (bigger wins); const 1.0 is fine.
- Modules
- DataViz.
Layout. Adjacency - DataViz.
Layout. Adjacency. Layout - DataViz.
Layout. Adjacency. Types - DataViz.
Layout. BlockCutTree - DataViz.
Layout. Chord - DataViz.
Layout. Chord. Layout - DataViz.
Layout. Chord. Types - DataViz.
Layout. Hierarchy. Cluster - DataViz.
Layout. Hierarchy. Core - DataViz.
Layout. Hierarchy. EdgeBundle - DataViz.
Layout. Hierarchy. EdgeBundle. Bilink - DataViz.
Layout. Hierarchy. EdgeBundle. BundleCurve - DataViz.
Layout. Hierarchy. EdgeBundle. Hierarchy - DataViz.
Layout. Hierarchy. EdgeBundle. RadialCluster - DataViz.
Layout. Hierarchy. EdgeBundle. Types - DataViz.
Layout. Hierarchy. Link - DataViz.
Layout. Hierarchy. Pack - DataViz.
Layout. Hierarchy. Partition - DataViz.
Layout. Hierarchy. Tree - DataViz.
Layout. Hierarchy. TreeStyle - DataViz.
Layout. Hierarchy. Treemap - DataViz.
Layout. Hierarchy. Types - DataViz.
Layout. Pattern - DataViz.
Layout. Pattern. Adapters - DataViz.
Layout. Pattern. Types - DataViz.
Layout. Sankey. CSV - DataViz.
Layout. Sankey. Compute - DataViz.
Layout. Sankey. ComputeWithSteps - DataViz.
Layout. Sankey. Lanes - DataViz.
Layout. Sankey. Path - DataViz.
Layout. Sankey. Types - DataViz.
Layout. StateMachine - DataViz.
Layout. StateMachine. Layout - DataViz.
Layout. StateMachine. Path - DataViz.
Layout. StateMachine. Tree - DataViz.
Layout. StateMachine. Types - DataViz.
Layout. TidyDag