API Reference
Full type signatures and module documentation are on Pursuit. This page maps the territory.
Pursuit Documentation
Each package has auto-generated API docs on Pursuit, the PureScript documentation hub. Click any package to browse its types, functions, and module structure.
hylograph-selection v0.5.0 Core: HATS trees, interpreters, scales, color schemes, coordinated highlighting, interactions. hylograph-simulation v0.5.0 Force simulation engine — n-body, collision, link, centering forces. hylograph-simulation-halogen v0.5.0 Halogen component wrapper for tick-driven force simulation rendering. hylograph-layout v0.2.1 Layout algorithms — tree, edge bundle, Sankey, treemap, beeswarm. hylograph-graph v0.2.0 Graph data structures — adjacency lists, traversals, components, topo sort. hylograph-music v0.4.0 Data to sound — same fold, audio output.Key Signatures
Five functions that tell the whole programming model. Build a tree with elem and forEach, add interactivity with withBehaviors, render with rerender.
elem ::ElementTypeArrayAttrArrayTreeTree
Construct a tree node: element type, attributes, children.
forEach ::StringElementTypeArraya(- a
String
)(- a
Tree
)Tree
The fold: name, element type, data, key function, template — produces a tree.
withBehaviors ::ArrayThunkedBehaviorTreeTree
Attach interactive behaviors (hover, drag, zoom) to a tree node.
rerender ::StringTreeEffectUnit
The interpreter boundary: pure tree in, effectful DOM out.
applyScale ::ContinuousScaleNumberNumber
Scales are just functions. Pure, no D3.
Key Modules (hylograph-selection)
The selection package is the foundation. Here are its main module groups:
Tree Construction
- Hylograph.HATS — Tree type, elem, forEach, withBehaviors
- Hylograph.HATS.Friendly — F.width, F.cx, F.fill and friends
- Hylograph.HATS.InterpreterTick — rerender (SVG interpreter)
Scales & Color
- Hylograph.Scale — Facade: linear, log, pow, sqrt + color schemes + interpolators
- Hylograph.Scale.Pure — Pure implementation (no D3)
- Hylograph.Scale.Sequential — 37 color interpolators (Viridis, Blues, RdYlGn, etc.)
Interpreters
- Hylograph.Interpreter.English — Plain English description of a tree
- Hylograph.Interpreter.Mermaid — Mermaid diagram syntax
- Hylograph.Interpreter.MetaHATS — Tree → Tree structure visualization
Interactions
- Hylograph.Interaction.Coordinated — Cross-view hover, brush, selection
- Hylograph.Interaction.Zoom — Zoom and pan
- Hylograph.Interaction.Brush — Brush selection
