Module
DataViz.Layout.Hierarchy.EdgeBundle.Hierarchy
- Package
- purescript-hylograph-layout
- Repository
- afcondon/purescript-hylograph-layout
DataViz.Layout.Hierarchy.EdgeBundle.Hierarchy
Build a tree hierarchy from flat dot-notation names. This implements the same algorithm as D3's Observable example: names like "flare.animate.Easing" become nested tree nodes.
#buildHierarchy Source
buildHierarchy :: forall a. { getName :: a -> String } -> Array a -> TreeNode aBuild a hierarchy from flat imported nodes Takes an array of nodes with dot-notation names and builds a tree
Algorithm:
- For each node, split name by "." to get path components
- Create/find intermediate nodes for each path component
- Attach leaf data at the final node
#getTreeNodeName Source
getTreeNodeName :: forall a. TreeNode a -> StringGet the short name of a node
#getTreeNodeChildren Source
getTreeNodeChildren :: forall a. TreeNode a -> Array (TreeNode a)Get children of a node
#getTreeNodeData Source
getTreeNodeData :: forall a. TreeNode a -> Maybe aGet the user data (if this is a leaf)
#descendants Source
descendants :: forall a. TreeNode a -> Array (TreeNode a)Get all descendant nodes (pre-order traversal, including self)
#getFullName Source
getFullName :: forall a. TreeNode a -> StringGet the full name of a node
- Modules
- DataViz.
Layout. Adjacency - DataViz.
Layout. Adjacency. Layout - DataViz.
Layout. Adjacency. Types - 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. Types - DataViz.
Layout. Sankey. CSV - DataViz.
Layout. Sankey. Compute - DataViz.
Layout. Sankey. ComputeWithSteps - DataViz.
Layout. Sankey. Path - DataViz.
Layout. Sankey. Types - DataViz.
Layout. StateMachine - DataViz.
Layout. StateMachine. Layout - DataViz.
Layout. StateMachine. Path - DataViz.
Layout. StateMachine. Types