Class Index | File Index

Classes


Class pv.Layout.Cluster


Extends pv.Layout.Hierarchy.
Implements a hierarchical layout using the cluster (or dendrogram) algorithm. This layout provides both node-link and space-filling implementations of cluster diagrams. In many ways it is similar to pv.Layout.Partition, except that leaf nodes are positioned at maximum depth, and the depth of internal nodes is based on their distance from their deepest descendant, rather than their distance from the root.

The cluster layout supports a "group" property, which if true causes siblings to be positioned closer together than unrelated nodes at the same depth. Unlike the partition layout, this layout does not support dynamic sizing for leaf nodes; all leaf nodes are the same size.

For more details on how to use this layout, see pv.Layout.Hierarchy.
Defined in: Cluster.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructs a new, empty cluster layout.
Field Summary
Field Attributes Field Name and Description
 
Defaults for cluster layouts.
 
The group parameter; defaults to 0, disabling grouping of siblings.
 
The inner radius; defaults to 0.
 
The orientation.
 
The outer radius; defaults to fill the containing panel, based on the height and width of the layout.
Fields borrowed from class pv.Layout.Network:
label, link, node
Fields borrowed from class pv.Panel:
canvas, children, overflow, transform
Fields borrowed from class pv.Bar:
fillStyle, height, lineWidth, strokeStyle, width
Fields borrowed from class pv.Mark:
bottom, childIndex, cursor, data, events, index, left, parent, proto, reverse, right, root, scale, title, top, type, visible
Methods borrowed from class pv.Layout.Network:
reset
Methods borrowed from class pv.Panel:
add, anchor
Methods borrowed from class pv.Mark:
anchorTarget, def, event, extend, margin, mouse, render
Class Detail
pv.Layout.Cluster()
Constructs a new, empty cluster layout. Layouts are not typically constructed directly; instead, they are added to an existing panel via pv.Mark#add.
See:
pv.Layout.Cluster.Fill
Field Detail
{pv.Layout.Cluster} defaults
Defaults for cluster layouts. The default group parameter is 0 and the default orientation is "top".

{number} group
The group parameter; defaults to 0, disabling grouping of siblings. If this parameter is set to a positive number (or true, which is equivalent to 1), then additional space will be allotted between sibling groups. In other words, siblings (nodes that share the same parent) will be positioned more closely than nodes at the same depth that do not share a parent.

{number} innerRadius
The inner radius; defaults to 0. This property applies only to radial orientations, and can be used to compress the layout radially. Note that for the node-link implementation, the root node is always at the center, regardless of the value of this property; this property only affects internal and leaf nodes. For the space-filling implementation, a non-zero value of this property will result in the root node represented as a ring rather than a circle.

{string} orient
The orientation. The default orientation is "top", which means that the root node is placed on the top edge, leaf nodes appear on the bottom edge, and internal nodes are in-between. The following orientations are supported:

{number} outerRadius
The outer radius; defaults to fill the containing panel, based on the height and width of the layout. If the layout has no height and width specified, it will extend to fill the enclosing panel.

Documentation generated by JsDoc Toolkit 2.3.2 on Sun May 30 2010 18:10:24 GMT-0700 (PDT)