Hylograph Project Documentation

hylograph-layout

purescript-hylograph-layout

Layout Gallery Demo

Pure PureScript implementations of layout algorithms for hierarchies and flow diagrams.

Overview

Layout algorithms for hierarchical and graph data, implemented in pure PureScript. Many of these layouts are familiar to users of D3 but here they are implemented without FFI dependencies using FP implementations in 100% PureScript. The hierarchical ones work with the rose-tree data structure from purescript-tree-rose.

Installation

spago install hylograph-layout

Available Layouts

Hierarchical Layouts

Graph Layouts

Example

import DataViz.Layout.Hierarchy.Tree (tree, defaultTreeConfig)
import Data.Tree (mkTree)

myTree = mkTree "root" [mkTree "a" [], mkTree "b" []]
config = defaultTreeConfig { size = { width: 400.0, height: 300.0 } }
positioned = tree config myTree
-- Each node now has x, y coordinates

Modules

Part of Hylograph

Uses tree-rose for rose tree data structures.

License

MIT