# Class: c3.Plot.Selectable

Defined in: | js/c3-plot.coffee
Inherits: | c3.Plot

## Overview

TODO: Allow user to set events on their layers by moving brush to back?

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.

### Author:

- Douglas Armstrong

## Variables Summary

version =

      0.1

type =

      'selectable'

selectable =

      'hv'

  [Boolean, String] Specify if plot is selectable in the `h` or `v` direction or both.

drag_selections =

      true

  [Boolean] When true, existing selections move/resize when dragged, otherwise a new selection will be made.

### Variable inherited from c3.Plot

version type layers axes data h v x y h_domain v_domain margins crop_margins layer_options axis_options class options content_options 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]]

### Parameters:

- selection ( `Array<Number>, Array<Array<Number>>` ) — The extent of the region to select or null to clear selection.

Quickly fuzzy find classes, mixins, methods, file:

- T Open fuzzy finder dialog

Control the navigation frame:

- L Toggle list view
- C Show class list
- I Show mixin list
- F Show file list
- M Show method list
- E Show extras list

You can focus and blur the search input:

- S Focus search input
- Esc Blur search input