Module
DataViz.Layout.Hierarchy.EdgeBundle.RadialCluster
- Package
- purescript-hylograph-layout
- Repository
- afcondon/purescript-hylograph-layout
DataViz.Layout.Hierarchy.EdgeBundle.RadialCluster
Radial cluster layout for edge bundling. Positions leaf nodes around a circle and internal nodes at the center.
The layout uses (angle, radius) coordinates:
- angle: position around the circle (0 to 2π radians)
- radius: distance from center (internal nodes closer to center, leaves at edge)
#RadialLayoutConfig Source
type RadialLayoutConfig = { endAngle :: Number, innerRadius :: Number, outerRadius :: Number, startAngle :: Number }Configuration for radial cluster layout
#defaultRadialConfig Source
defaultRadialConfig :: RadialLayoutConfigDefault configuration
#RadialNode Source
data RadialNode aA node with radial coordinates
Constructors
RadialNode { children :: Array (RadialNode a), data_ :: Maybe a, depth :: Int, fullName :: String, height :: Int, name :: String, x :: Number, y :: Number }
Instances
(Show a) => Show (RadialNode a)
#radialCluster Source
radialCluster :: forall a. RadialLayoutConfig -> TreeNode a -> RadialNode aApply radial cluster layout to a tree
Algorithm:
- Assign sequential indices to leaves (angular positions)
- Position leaves evenly around the circle at outerRadius
- Position internal nodes at mean angle of children, at appropriate radius
#toCartesian Source
toCartesian :: forall a. RadialNode a -> { x :: Number, y :: Number }Convert radial coordinates to Cartesian for SVG rendering
#radialClusterFromTree Source
radialClusterFromTree :: forall a. TreeNode a -> RadialNode aConvenience function: layout from a TreeNode using default config
- 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