Class Index | File Index

Classes


Class pv.Line


Extends pv.Mark.
Represents a series of connected line segments, or polyline, that can be stroked with a configurable color and thickness. Each articulation point in the line corresponds to a datum; for n points, n-1 connected line segments are drawn. The point is positioned using the box model. Arbitrary paths are also possible, allowing radar plots and other custom visualizations.

Like areas, lines can be stroked and filled with arbitrary colors. In most cases, lines are only stroked, but the fill style can be used to construct arbitrary polygons.

See also the Line guide.
Defined in: Line.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructs a new line mark with default properties.
Field Summary
Field Attributes Field Name and Description
 
Default properties for lines.
 
The line fill style; if non-null, the interior of the line is closed and filled with the specified color.
 
How to interpolate between values.
 
The width of stroked lines, in pixels; used in conjunction with strokeStyle to stroke the line.
 
Whether the line is segmented; whether variations in stroke style, line width and the other properties are treated as fixed.
 
The style of stroked lines; used in conjunction with lineWidth to stroke the line.
Fields borrowed from class pv.Mark:
bottom, childIndex, cursor, data, index, left, parent, proto, reverse, right, root, scene, title, top, type, visible
Methods borrowed from class pv.Mark:
add, anchor, anchorTarget, cousin, def, event, extend, first, last, mouse, render, sibling
Class Detail
pv.Line()
Constructs a new line mark with default properties. Lines are not typically constructed directly, but by adding to a panel or an existing mark via pv.Mark#add.
Field Detail
{pv.Line} defaults
Default properties for lines. By default, there is no fill and the stroke style is a categorical color. The default interpolation is linear.

{string} fillStyle
The line fill style; if non-null, the interior of the line is closed and filled with the specified color. The default value of this property is a null, meaning that lines are not filled by default.
See:
pv.color

{string} interpolate
How to interpolate between values. Linear interpolation ("linear") is the default, producing a straight line between points. For piecewise constant functions (i.e., step functions), either "step-before" or "step-after" can be specified.

Note: this property is currently supported only on non-segmented lines.

This property is fixed. See pv.Mark.


{number} lineWidth
The width of stroked lines, in pixels; used in conjunction with strokeStyle to stroke the line.

{boolean} segmented
Whether the line is segmented; whether variations in stroke style, line width and the other properties are treated as fixed. Rendering segmented lines is noticeably slower than non-segmented lines.

This property is fixed. See pv.Mark.


{string} strokeStyle
The style of stroked lines; used in conjunction with lineWidth to stroke the line. The default value of this property is a categorical color.
See:
pv.color

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Oct 06 2009 09:59:02 GMT-0700 (PDT)