Represents a horizontal or vertical rule. Rules are frequently used for axes and grid lines. For example, specifying only the bottom property draws horizontal rules, while specifying only the left draws vertical rules. Rules can also be used as thin bars. The visual style is controlled in the same manner as lines.
Rules are positioned exclusively the standard box model properties. The following combinations of properties are supported:
|left, bottom, top||vertical|
|right, bottom, top||vertical|
|top, left, right||horizontal|
|bottom, left, right||horizontal|
|left, top, height||vertical|
|left, bottom, height||vertical|
|right, top, height||vertical|
|right, bottom, height||vertical|
|left, top, width||horizontal|
|left, bottom, width||horizontal|
|right, top, width||horizontal|
|right, bottom, width||horizontal|
Small rules can be used as tick marks; alternatively, a Dot with the "tick" shape can be used.
|Constructor Attributes||Constructor Name and Description|
Constructs a new rule with default properties.
|Field Attributes||Field Name and Description|
Constructs a new rule anchor with default properties.
Default properties for rules.
The height of the rule, in pixels.
The width of stroked lines, in pixels; used in conjunction with strokeStyle to stroke the rule.
The style of stroked lines; used in conjunction with lineWidth to stroke the rule.
The width of the rule, in pixels.
- Fields borrowed from class pv.Mark:
- bottom, childIndex, cursor, data, events, index, left, parent, proto, reverse, right, root, scale, title, top, type, visible
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.