Class Index | File Index


Class pv.Layout.Hierarchy

Extends pv.Layout.Network.
Represents an abstract layout for hierarchy diagrams. This class is a specialization of pv.Layout.Network, providing the basic structure for both hierarchical node-link diagrams (such as Reingold-Tilford trees) and space-filling hierarchy diagrams (such as sunbursts and treemaps).

Unlike general network layouts, the links property need not be defined explicitly. Instead, the links are computed implicitly from the parentNode attribute of the node objects, as defined by the nodes property. This implementation is also available as #links, for reuse with non-hierarchical layouts; for example, to render a tree using force-directed layout.

Correspondingly, the nodes property is represented as a union of pv.Layout.Network.Node and pv.Dom.Node. To construct a node hierarchy from a simple JSON map, use the pv.Dom operator; this operator also provides an easy way to sort nodes before passing them to the layout.

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

Class Summary
Constructor Attributes Constructor Name and Description
Constructs a new, empty hierarchy layout.
Fields borrowed from class pv.Layout.Network:
label, link, node
Fields borrowed from class pv.Panel:
canvas, children, defaults, 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
Method Summary
Method Attributes Method Name and Description
The implied links; computes links using the parentNode attribute.
Methods borrowed from class pv.Layout.Network:
Methods borrowed from class pv.Panel:
add, anchor
Methods borrowed from class pv.Mark:
anchorTarget, def, event, extend, margin, mouse, render
Class Detail
Constructs a new, empty hierarchy layout. Layouts are not typically constructed directly; instead, they are added to an existing panel via pv.Mark#add.
Method Detail
<static> pv.Layout.Hierarchy.links()
The implied links; computes links using the parentNode attribute.

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