DataViz.Layout.Sankey.Types
- Package
- purescript-hylograph-layout
- Repository
- afcondon/purescript-hylograph-layout
DataViz.Layout.Sankey.Types
Pure PureScript implementation of Sankey diagram layout types. This replaces the FFI-based approach with first-class PureScript types that integrate naturally with the phantom type system.
#LinkCSVRow Source
type LinkCSVRow = { s :: String, t :: String, v :: Number }Input format for links from CSV (user-provided flow data with named nodes)
#SankeyNodeInput Source
type SankeyNodeInput = { name :: String }Input format for nodes (minimal user-provided data) - for backward compatibility
#SankeyNode Source
type SankeyNode = { color :: String, depth :: Int, index :: NodeID, layer :: Int, name :: String, nodeHeight :: Int, sourceLinks :: Set NodeID, targetLinks :: Set NodeID, value :: Number, x0 :: Number, x1 :: Number, y0 :: Number, y1 :: Number }Internal node representation after layout computation This has all computed properties needed for rendering
#initialiseSankeyLink Source
initialiseSankeyLink :: { id :: LinkID, source :: NodeID, target :: NodeID, value :: Number } -> SankeyLink#SankeyLayoutResult Source
type SankeyLayoutResult = { links :: Array SankeyLink, nodes :: Array SankeyNode }Result of Sankey layout computation
#SankeyConfig Source
type SankeyConfig = { alignment :: Alignment, extent :: { x0 :: Number, x1 :: Number, y0 :: Number, y1 :: Number }, iterations :: Int, linkColorMode :: LinkColorMode, nodePadding :: Number, nodeWidth :: Number }Configuration for Sankey layout algorithm
#SankeyStep Source
type SankeyStep = { iteration :: Int, label :: String, links :: Array SankeyLink, nodes :: Array SankeyNode }A captured step for debugging/visualization
#LinkColorMode Source
#defaultSankeyConfig Source
defaultSankeyConfig :: Number -> Number -> SankeyConfigDefault configuration matching D3 defaults
#SankeyGraphModel Source
type SankeyGraphModel = { capturedSteps :: Array SankeyStep, config :: SankeyConfig, graph :: DAG NodeID Number, linkCount :: Int, nodeCount :: Int, nodeIDToName :: NodeNameMap, nodeNameToID :: NodeIDMap, nodeOrder :: Array NodeID, sankeyLinks :: Array SankeyLink, sankeyNodes :: Array SankeyNode }Graph model for State monad - contains all intermediate computation state SankeyGraphModel is created by folding rows of CSV
- 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