Class Index | File Index

Classes


Class pv.Layout.Tree


Extends pv.Layout.Hierarchy.
Implements a node-link tree diagram using the Reingold-Tilford "tidy" tree layout algorithm. The specific algorithm used by this layout is based on "Improving Walker's Algorithm to Run in Linear Time" by C. Buchheim, M. Jünger & S. Leipert, Graph Drawing 2002. This layout supports both cartesian and radial orientations orientations for node-link diagrams.

The tree layout supports a "group" property, which if true causes siblings to be positioned closer together than unrelated nodes at the same depth. The layout can be configured using the depth and breadth properties, which control the increments in pixel space between nodes in both dimensions, similar to the indent layout.

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

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructs a new, empty tree layout.
Field Summary
Field Attributes Field Name and Description
 
The offset between siblings nodes; defaults to 15.
 
Default properties for tree layouts.
 
The offset between parent and child nodes; defaults to 60.
 
The sibling grouping, i.e.
 
The orientation.
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.Tree()
Constructs a new, empty tree layout. Layouts are not typically constructed directly; instead, they are added to an existing panel via pv.Mark#add.
Field Detail
{number} breadth
The offset between siblings nodes; defaults to 15.

{pv.Layout.Tree} defaults
Default properties for tree layouts. The default orientation is "top", the default group parameter is 1, and the default breadth and depth offsets are 15 and 60 respectively.

{number} depth
The offset between parent and child nodes; defaults to 60.

{number} group
The sibling grouping, i.e., whether differentiating space is placed between sibling groups. The default is 1 (or true), causing sibling leaves to be separated by one breadth offset. Setting this to false (or 0) causes non-siblings to be adjacent.

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

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