DataViz.Layout.Hierarchy.TreeStyle
- Package
- purescript-hylograph-layout
- Repository
- afcondon/purescript-hylograph-layout
Type-Safe Tree Styles
Bundles tree layout orientation with matching link path generators. This prevents mismatches like using horizontal beziers with vertical trees.
Usage:
-- Get a bundled style with matching link generator
let style = verticalTree { width: 800.0, height: 600.0 }
-- Use the bundled link generator
let pathD = style.linkPath x1 y1 x2 y2
-- Or create a custom style
let custom = customTree myConfig myLinkFn
#TreeStyle Source
type TreeStyle = { linkPath :: LinkPathFn, orientation :: TreeOrientation }A tree style bundles orientation with its matching link path generator. The orientation is a phantom type that enables type-safe composition.
#verticalTree Source
verticalTree :: TreeStyleVertical tree: root at top, children below Uses vertical bezier curves (control points at midpoint Y)
#horizontalTree Source
horizontalTree :: TreeStyleHorizontal tree: root at left, children to the right Uses horizontal bezier curves (control points at midpoint X)
#radialTree Source
radialTree :: TreeStyleRadial tree: root at center, children radiate outward Uses radial bezier curves (control points follow arc)
#linkPath Source
linkPath :: TreeStyle -> LinkPathFnGet the link path generator from a tree style
#orientation Source
orientation :: TreeStyle -> TreeOrientationGet the orientation from a tree style
#customTree Source
customTree :: LinkPathFn -> TreeStyleCustom tree style with user-provided link generator Use this when you need a non-standard pairing
#TreeOrientation Source
- 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