DataViz.Layout.Hierarchy.Treemap
- Package
- purescript-hylograph-layout
- Repository
- afcondon/purescript-hylograph-layout
DataViz.Layout.Hierarchy.Treemap
Pure PureScript implementation of D3's treemap layout. Partitions rectangles to represent hierarchical data with area proportional to value.
#TreemapNode Source
data TreemapNode aNode with treemap layout coordinates Extends ValuedNode with x0, y0, x1, y1 bounds
Constructors
TNode { children :: Array (TreemapNode a), data_ :: a, depth :: Int, height :: Int, value :: Number, x0 :: Number, x1 :: Number, y0 :: Number, y1 :: Number }
Instances
(Eq a) => Eq (TreemapNode a)(Ord a) => Ord (TreemapNode a)(Show a) => Show (TreemapNode a)
#TileFunction Source
type TileFunction a = TreemapNode a -> Number -> Number -> Number -> Number -> TreemapNode aTiling function type Takes parent node and bounds, positions children
#defaultTreemapConfig Source
defaultTreemapConfig :: forall a. TreemapConfig aDefault treemap configuration
#toTreemapNode Source
toTreemapNode :: forall a. ValuedNode a -> TreemapNode aConvert ValuedNode to TreemapNode (without positioning)
#treemap Source
treemap :: forall a. TreemapConfig a -> ValuedNode a -> TreemapNode aMain treemap layout function
#dice Source
dice :: forall a. TreemapNode a -> Number -> Number -> Number -> Number -> TreemapNode aDice tiling: horizontal partitioning (varies x, constant y)
#slice Source
slice :: forall a. TreemapNode a -> Number -> Number -> Number -> Number -> TreemapNode aSlice tiling: vertical partitioning (constant x, varies y)
#sliceDice Source
sliceDice :: forall a. TileFunction aSlice-dice tiling: alternates between slice and dice at each depth level Provides a simple alternating pattern
#binary Source
binary :: forall a. TileFunction aBinary tiling: divides space based on splitting the value sum Simpler approach: split children into two groups, position each group with slice/dice
#squarify Source
squarify :: forall a. Number -> TileFunction aSquarify tiling: minimizes aspect ratios (creates more square-like rectangles)
- 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