Module

DataViz.Layout.Hierarchy.EdgeBundle.Types

Package
purescript-hylograph-layout
Repository
afcondon/purescript-hylograph-layout

DataViz.Layout.Hierarchy.EdgeBundle.Types

Types for hierarchical edge bundling visualization. Based on Danny Holten's algorithm and D3's implementation.

Edge bundling shows dependencies between nodes in a hierarchy by:

  1. Arranging nodes in a radial cluster layout
  2. Drawing curved edges that bundle together based on shared ancestry
  3. The tighter the bundle (higher beta), the more edges follow tree structure

#ImportedNode Source

type ImportedNode = { imports :: Array String, name :: String, size :: Number }

Input format: flat array of nodes with dot-notation names and imports Example: { "name": "flare.animate.Easing", "size": 17010, "imports": ["flare.util.Arrays"] }

#parseImportedNode Source

parseImportedNode :: Foreign -> Maybe ImportedNode

Parse a Foreign value into an ImportedNode

#BundleTree Source

type BundleTree a = BundleNode a

Type alias for the full tree

#BundleNode Source

data BundleNode a

A node in the bundle hierarchy tree Contains the data plus computed layout information

Constructors

#getBundleData Source

getBundleData :: forall a. BundleNode a -> a

Get the user data from a bundle node

#getBundleChildren Source

getBundleChildren :: forall a. BundleNode a -> Array (BundleNode a)

Get children of a bundle node

#getBundleParent Source

getBundleParent :: forall a. BundleNode a -> Maybe (BundleNode a)

Get parent of a bundle node

#RadialNode Source

type RadialNode = { fullName :: String, x :: Number, y :: Number }

Node position after radial layout Used for rendering and path computation

#EdgeBundleConfig Source

type EdgeBundleConfig = { beta :: Number, innerRadius :: Number, nodeSpacing :: Number, radius :: Number }

Configuration for edge bundle layout

#defaultEdgeBundleConfig Source

defaultEdgeBundleConfig :: EdgeBundleConfig

Default configuration