Module

DataViz.Layout.Chord.Types

Package
purescript-hylograph-layout
Repository
afcondon/purescript-hylograph-layout

DataViz.Layout.Chord.Types

Types for chord diagram visualization.

A chord diagram shows relationships between nodes arranged in a circle, with ribbons (curved bands) connecting related nodes.

The layout takes a square matrix where:

  • matrix[i][j] represents the flow/connection strength from node i to node j
  • Each node gets an arc proportional to its total connections
  • Ribbons connect arcs, with width proportional to connection strength

#ChordMatrix Source

type ChordMatrix = { matrix :: Array (Array Number), names :: Array String }

Input matrix for chord diagram Contains connection weights and node names

#ChordGroup Source

type ChordGroup = { endAngle :: Number, index :: Int, startAngle :: Number, value :: Number }

A group (arc) in the chord layout Represents a single node's portion of the circle perimeter

#Chord Source

type Chord = { source :: ChordGroup, target :: ChordGroup }

A chord (ribbon) connecting two groups Represents the flow between two nodes

#ChordLayout Source

type ChordLayout = { chords :: Array Chord, groups :: Array ChordGroup }

Complete chord layout ready for rendering

#LayoutConfig Source

type LayoutConfig = { endAngle :: Number, padAngle :: Number, sortChords :: Boolean, sortGroups :: Boolean, startAngle :: Number }

Configuration for chord layout

#defaultConfig Source

defaultConfig :: LayoutConfig

Default layout configuration