SquarifiedAlgorithm

Implementation of the Squarified algorithm. It is described in:

Bruls, D.M., C. Huizing, J.J. van Wijk. "Squarified Treemaps". In: W. de Leeuw, R. van Liere (eds.), Data Visualization 2000, Proceedings of the joint Eurographics and IEEE TCVG Symposium on Visualization, 2000, pp. 33-42.

Sub-divids a parent rectangular area into child rectangles. It implements the squaring treemap algorithm where all child nodes are allocated areas proportional to their values, but the aspect ratio of each rectangle is kept as close as possible to a square.

Complexity: O(n), where n is the number of nodes in the tree.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val isChildContained: Boolean
Link copied to clipboard
open override val isColorParent: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val isSpaceFilling: Boolean
Link copied to clipboard
open override val properties: MutableProperties<String?>

Properties for storing layout algorithm specific options.

Functions

Link copied to clipboard
open override fun <N, Row, Column> breadthFirstLayout(shape: Shape, parent: N, children: Array<N>, sumSize: Double, horizontalVanishingPoint: Int, verticalVanishingPoint: Int, accessor: TreeMapAccessor<N>, worker: TreeMapWorker?): Boolean

{@inheritDoc}

Link copied to clipboard
open override fun <N, Row, Column> depthFirstLayout(shape: Shape?, parent: N, children: Array<N>, sumSizes: Double, horizontalVanishingPoint: Int, verticalVanishingPoint: Int, accessor: TreeMapAccessor<N>, worker: TreeMapWorker?): Boolean

Arrange the items in the given array to fill the given shape. This is called during the first pass, while traversing the tree from the bottom up.

Link copied to clipboard
open override fun <N, Row, Column> finishLayout(bounds: Rectangle2D?, model: TreeMapModel<N, Row, Column>?, root: N)

Do nothing by default.

Link copied to clipboard
open override fun isCompatible(shape: Shape?): Boolean

Indicates whether the layout algorithm can handle the given geometry of its parent

Link copied to clipboard
open override fun <N, Row, Column> iterator(model: TreeMapModel<N, Row, Column>, root: N): Iterable<N>

Breadth first traversal by default.

Link copied to clipboard
open override fun <N, Row, Column> startLayout(bounds: Rectangle2D?, model: TreeMapModel<N, Row, Column>, root: N, worker: TreeMapWorker?)

Do nothing by default.

Link copied to clipboard
open override fun toString(): String