Class Index | File Index

Classes


Class pv.Layout


Extends pv.Panel.
Represents an abstract layout, encapsulating a visualization technique such as a streamgraph or treemap. Layouts are themselves containers, extending from pv.Panel, and defining a set of mark prototypes as children. These mark prototypes provide default properties that together implement the given visualization technique.

Layouts do not initially contain any marks; any exported marks (such as a network layout's link and node) are intended to be used as prototypes. By adding a concrete mark, such as a pv.Bar, to the appropriate mark prototype, the mark is added to the layout and inherits the given properties. This approach allows further customization of the layout, either by choosing a different mark type to add, or more simply by overriding some of the layout's defined properties.

Each concrete layout, such as treemap or circle-packing, has different behavior and may export different mark prototypes, depending on what marks are typically needed to render the desired visualization. Therefore it is important to understand how each layout is structured, such that the provided mark prototypes are used appropriately.

In addition to the mark prototypes, layouts may define custom properties that affect the overall behavior of the layout. For example, a treemap layout might use a property to specify which layout algorithm to use. These properties are just like other mark properties, and can be defined as constants or as functions. As with panels, the data property can be used to replicate layouts, and properties can be defined to in terms of layout data.
Defined in: Layout.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructs a new, empty layout with default properties.
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
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()
Constructs a new, empty layout with default properties. Layouts are not typically constructed directly; instead, a concrete subclass is added to an existing panel via pv.Mark#add.

Documentation generated by JsDoc Toolkit 2.3.2 on Fri May 28 2010 10:13:28 GMT-0700 (PDT)