← Hylograph

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 ::
  1. ElementType
  2. ArrayAttr
  3. ArrayTree
  4. Tree

Construct a tree node: element type, attributes, children.

forEach ::
  1. String
  2. ElementType
  3. Arraya
  4. (
    1. a
    2. String
    )
  5. (
    1. a
    2. Tree
    )
  6. Tree

The fold: name, element type, data, key function, template — produces a tree.

withBehaviors ::
  1. ArrayThunkedBehavior
  2. Tree
  3. Tree

Attach interactive behaviors (hover, drag, zoom) to a tree node.

rerender ::
  1. String
  2. Tree
  3. EffectUnit

The interpreter boundary: pure tree in, effectful DOM out.

applyScale ::
  1. ContinuousScale
  2. Number
  3. Number

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

Scales & Color

Interpreters

Interactions