Class pv.Bar
Extends
pv.Mark.
Represents a bar: an axis-aligned rectangle that can be stroked and
filled. Bars are used for many chart types, including bar charts, histograms
and Gantt charts. Bars can also be used as decorations, for example to draw a
frame border around a panel; in fact, a panel is a special type (a subclass)
of bar.
Bars can be positioned in several ways. Most commonly, one of the four corners is fixed using two margins, and then the width and height properties determine the extent of the bar relative to this fixed location. For example, using the bottom and left properties fixes the bottom-left corner; the width then extends to the right, while the height extends to the top. As an alternative to the four corners, a bar can be positioned exclusively using margins; this is convenient as an inset from the containing panel, for example. See pv.Mark for details on the prioritization of redundant positioning properties.
See also the Bar guide.
Defined in: Bar.js.
Constructor Attributes | Constructor Name and Description |
---|---|
pv.Bar()
Constructs a new bar mark with default properties.
|
Field Attributes | Field Name and Description |
---|---|
Default properties for bars.
|
|
The bar fill style; if non-null, the interior of the bar is filled with the
specified color.
|
|
The height of the bar, in pixels.
|
|
The width of stroked lines, in pixels; used in conjunction with
strokeStyle to stroke the bar's border.
|
|
The style of stroked lines; used in conjunction with lineWidth to
stroke the bar's border.
|
|
The width of the bar, 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
- Methods borrowed from class pv.Mark:
- add, anchor, anchorTarget, def, event, extend, margin, mouse, render
- See:
- pv.color
- See:
- pv.color