Class Index | File Index

Classes


Class pv.Dot


Extends pv.Mark.
Represents a dot; a dot is simply a sized glyph centered at a given point that can also be stroked and filled. The size property is proportional to the area of the rendered glyph to encourage meaningful visual encodings. Dots can visually encode up to eight dimensions of data, though this may be unwise due to integrality. See pv.Mark for details on the prioritization of redundant positioning properties.

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

Class Summary
Constructor Attributes Constructor Name and Description
 
pv.Dot()
Constructs a new dot mark with default properties.
Field Summary
Field Attributes Field Name and Description
 
The rotation angle, in radians.
 
Default properties for dots.
 
The fill style; if non-null, the interior of the dot is filled with the specified color.
 
The width of stroked lines, in pixels; used in conjunction with strokeStyle to stroke the dot's shape.
 
The radius of the dot, in pixels.
 
The shape name.
 
The size of the dot, in square pixels.
 
The style of stroked lines; used in conjunction with lineWidth to stroke the dot's shape.
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
 
anchor(name)
Constructs a new dot anchor with default properties.
Methods borrowed from class pv.Mark:
add, anchorTarget, def, event, extend, margin, mouse, render
Class Detail
pv.Dot()
Constructs a new dot mark with default properties. Dots are not typically constructed directly, but by adding to a panel or an existing mark via pv.Mark#add.
Field Detail
{number} angle
The rotation angle, in radians. Used to rotate shapes, such as to turn a cross into a plus.

{pv.Dot} defaults
Default properties for dots. By default, there is no fill and the stroke style is a categorical color. The default shape is "circle" with size 20.

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

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

{number} radius
The radius of the dot, in pixels. This is an alternative to using #size.
See:
#size

{string} shape
The shape name. Several shapes are supported:These shapes can be further changed using the #angle property; for instance, a cross can be turned into a plus by rotating. Similarly, the tick, which is vertical by default, can be rotated horizontally. Note that some shapes (cross and tick) do not have interior areas, and thus do not support fill style meaningfully.

Note: it may be more natural to use the pv.Rule mark for horizontal and vertical ticks. The tick shape is only necessary if angled ticks are needed.


{number} size
The size of the dot, in square pixels. Square pixels are used such that the area of the dot is linearly proportional to the value of the size property, facilitating representative encodings.
See:
#radius

{string} strokeStyle
The style of stroked lines; used in conjunction with lineWidth to stroke the dot's shape. The default value of this property is a categorical color.
See:
pv.color
Method Detail
{pv.Anchor} anchor(name)
Constructs a new dot anchor with default properties. Dots support five different anchors:In addition to positioning properties (left, right, top bottom), the anchors support text rendering properties (text-align, text-baseline). Text is rendered to appear outside the dot. Note that this behavior is different from other mark anchors, which default to rendering text inside the mark.

For consistency with the other mark types, the anchor positions are defined in terms of their opposite edge. For example, the top anchor defines the bottom property, such that a bar added to the top anchor grows upward.

Parameters:
{string} name
the anchor name; either a string or a property function.
Returns:
{pv.Anchor}

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