Class: c3.Plot.Selectable
Defined in: | js/c3-plot.coffee |
Inherits: | c3.Plot |
Overview
A type of plot that allows making selections.
External Interface
In addition to the standard {c3.base c3 interface}, this chart adds:
- select() - Selection a region in the chart as if the user made one. This will not fire the
select
events to avoid infinite loops.
Events
- select - Triggered when a selection is started and being dragged. Passed with the current selection domain.
- selectend - Triggered when a selection is made. Passed with the selected domain.
Variables Summary
- version =
-
0.1
- type =
-
'selectable'
- selectable =
-
'hv'
[Boolean, String] Specify if plot is selectable in the
h
orv
direction or both. - drag_selections =
-
true
[Boolean] When true, existing selections move/resize when dragged, otherwise a new selection will be made.
- selection =
-
undefined
[Array
] Specify an initialy selected range for rendering. This is updated if the user selects a range or calls select().
Variable inherited from c3.Plot
version type layers axes data h v x y h_orient v_orient h_domain v_domain margins crop_margins layer_options axis_options class options content_options _next_uid anchor height width anchor_styles handlers
Instance Method Summary
- # (void) _init() Bound
- # (void) _size() Bound
- # (void) select(selection) Bound Select a region in the chart.
Inherited Method Summary
Methods inherited from
c3.Plot
#_init #_size #_update #_draw #_style #scale #rescale #min_x #max_x #min_y #max_y #init #style #render #resize #redraw #restyle #_prep #size #update #draw
Instance Method Details
#
(void)
_init()
Bound
#
(void)
_size()
Bound
#
(void)
select(selection)
Bound
Select a region in the chart. Depending on which axes are selectable the selection is either [x0,x1], [y0,y1], or [[x0,y0],[x1,y1]]