Class: c3.Plot.Layer.Path Abstract
Defined in: | js/c3-layers.coffee |
Inherits: | c3.Plot.Layer.Stackable |
Overview
Abstract chart layer for the XY Plot Chart. Please instantiate a c3.Plot.Layer.Line or c3.Plot.Layer.Area
Define an r
or a
to create circles at the various data points along the path
with that associated radius or area.
Extensibility
The following c3.Selection members are made available if appropriate:
- paths - There will be an element in paths for each stack in the layer
- circles - Circles for each datapoint
- labels - Labels for each datapoint
Direct Known Subclasses
c3.Plot.Layer.Line c3.Plot.Layer.Area
Variables Summary
- version =
-
0.2
- type =
-
'path'
- path_generator_factory =
-
undefined
[Function] Factory to generate an SVG path string generator function. _See https://github.com/mbostock/d3/wiki/SVG-Shapes#path-data-generators for details.
- interpolate =
-
undefined
[String] The type of D3 line interpolation to use. See d3.svg.area.interpolate for options. Some useful examples:
- linear - Straight lines between data points
- basis - Smooth curve based on a B-spline, the curve may not touch the data points
- cardinal - Smooth curve that intersects all data points.
- step-before - A step function where the horizontal segments are to the left of the data points
- step-after - A step function where the horizontal segments are to the right of the data points
- tension =
-
undefined
[Number] The tension value [0,1] for cardinal interpolation. See d3.svg.area.tension.
- defined =
-
undefined
[Function] Accessor function you can return true or false if the data point in data[] is defined or should be skipped. See d3.svg.area.defined. Note that this will cause disjoint paths on either side of the missing element, it will not render a continuous path that skips the undefined element. For that behaviour simply enable
safe
mode and have the x or y accessor return undefined. - r =
-
undefined
[Number, Function] Define to create circles at the data points along the path with this radius.
- a =
-
undefined
[Number, Function] Define to create circles at the data points along the path with this area. Takes precedence over r.
- path_options =
-
undefined
[c3.Selection.Options] Options for the svg:path. For example, to enable animations.
- circle_options =
-
undefined
[c3.Selection.Options] If circles are created at the data points via
r
ora
, then this defines options used to style or extend them. - label_options =
-
undefined
[c3.Selection.Options] Create labels for each datapoint with these options
Variable inherited from c3.Plot.Layer.Stackable
version type stack_options stacks safe _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) _update(origin) Bound
- # (void) _draw(origin) Bound
- # (void) _style(style_new) Bound
- # (void) min_x() Bound
- # (void) max_x() Bound
Inherited Method Summary
Methods inherited from
c3.Plot.Layer.Stackable
#_stack #_update #_style #min_x #max_x #min_y #max_y #init #size #update #draw #style #zoom #pan #redraw #scale
Instance Method Details
#
(void)
_init()
Bound
#
(void)
_update(origin)
Bound
#
(void)
_draw(origin)
Bound
#
(void)
_style(style_new)
Bound
#
(void)
min_x()
Bound
#
(void)
max_x()
Bound