Class: c3.Plot.Layer.Line.Straight Abstract
Defined in: | js/c3-layers.coffee |
Inherits: | c3.Plot.Layer |
Overview
Straight horizontal or vertical line layer for the XY Plot Chart. This is an abstract layer, please instantiate a c3.Plot.Layer.Line.Horizontal or c3.Plot.Layer.Line.Vertical directly.
A seperate line is drawn for each data element in the data
array.
Set label_options.text
to define a label for each line.
Straight line layers are not stackable.
Extensibility
The following c3.Selection members are made available if appropriate:
- vectors
- lines
- labels
Events
- dragstart
- drag
- dragend
Direct Known Subclasses
c3.Plot.Layer.Line.Horizontal c3.Plot.Layer.Line.Vertical
Variables Summary
- version =
-
0.1
- type =
-
'straight'
- key =
-
undefined
[Function] Optional accessor to identify data elements when changing the dataset
- value =
-
undefined
[Function] Accessor to get the value for each data element. Defaults to the identity function.
- filter =
-
undefined
[Function] Accessor to determine if data elements are filtered in or not.
- draggable =
-
false
[Boolean] Enable lines to be draggable. The drag event callbacks can be used to adjust the original data values
- vector_options =
-
undefined
[c3.Selection.Options] Options for the svg:g of the vector group nodes. There is one node per data element. Use this option for animating line movement.
- line_options =
-
undefined
[c3.Selection.Options] Options for the svg:line lines.
- grab_line_options =
-
undefined
[c3.Selection.Options] Options for the svg:line lines for hidden lines behind each line that is wider and easier for users to interact with e.g. for click or drag events.
- label_options =
-
undefined
[c3.Selection.Options] Define this to render labels. Options for the svg:text labels. This option also takes the following additional properties:
- alignment - [String] Alignment of label.
left
orright
for horizontal lines
top
orbottom
for vertical lines
- dx - [String] Relative placement for the label
- dy - [String] Relative placement for the label
Variable inherited from c3.Plot.Layer
version type _next_uid data name class static_data h v x y h_orient v_orient options handlers restyle
Instance Method Summary
- # (void) _init() Bound
- # (void) _size() Bound
- # (void) _update(origin) Bound
- # (void) _draw(origin) Bound
- # (void) _style(style_new) Bound
Inherited Method Summary
Methods inherited from
c3.Plot.Layer
#init #size #update #draw #style #zoom #pan #redraw #scale #min_x #max_x #min_y #max_y
Instance Method Details
#
(void)
_init()
Bound
#
(void)
_size()
Bound
#
(void)
_update(origin)
Bound
#
(void)
_draw(origin)
Bound
#
(void)
_style(style_new)
Bound