DataViz.Layout.StateMachine.Layout
- Package
- purescript-hylograph-layout
- Repository
- afcondon/purescript-hylograph-layout
DataViz.Layout.StateMachine.Layout
Pure layout algorithms for state machine visualization. Arranges states in a circular layout and computes curved arrow paths for transitions.
#layout Source
layout :: forall se te. StateMachine se te -> StateMachineLayout se teLayout a state machine with default configuration using circular layout
#layoutWithConfig Source
layoutWithConfig :: forall se te. LayoutConfig -> (LayoutConfig -> Array (State se) -> Array (LayoutState se)) -> StateMachine se te -> StateMachineLayout se teLayout with custom configuration and layout strategy
#LayoutConfig Source
type LayoutConfig = { arrowOffset :: Number, edgeCurvature :: Number, initialArrowLength :: Number, labelOffset :: Number, layoutRadius :: Number, margin :: Number, minPairedCurvature :: Number, parallelSeparation :: Number, selfLoopRadius :: Number, stateRadiusX :: Number, stateRadiusY :: Number }Configuration for state machine layout
#defaultConfig Source
defaultConfig :: LayoutConfigDefault layout configuration
#circularLayout Source
circularLayout :: forall extra. LayoutConfig -> Array (State extra) -> Array (LayoutState extra)Circular layout: arrange states in a circle
#gridLayout Source
gridLayout :: forall extra. LayoutConfig -> Array (State extra) -> Array (LayoutState extra)Grid layout: arrange states in rows
#ParallelInfo Source
type ParallelInfo = { count :: Int, hasOpposite :: Boolean, index :: Int }Where a transition sits among those sharing its endpoints.
index/count place same-direction siblings side by side. hasOpposite
is the antiparallel case and needs different treatment: A->B and B->A
already bow to opposite sides of the line (the perpendicular is computed
from the travel direction, which is reversed), so they want the same
positive magnitude rather than opposite offsets — they just need that
magnitude floored so the gap survives a flat base curve.
- 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