bokeh.models.widgets.inputs

Various kinds of input widgets and form controls.

class AutocompleteInput(**kwargs)

Bases: bokeh.models.widgets.inputs.TextInput

Single-line input widget with auto-completion.

completions

property type: List(String)

A list of completion strings. This will be used to guide the user when he types-in a value.

[
  {
    "attributes": {
      "callback": null,
      "completions": [],
      "disabled": false,
      "doc": null,
      "id": "c3029ccd-cb77-44d6-b685-b2cde28cc672",
      "name": null,
      "tags": [],
      "title": null,
      "value": null
    },
    "id": "c3029ccd-cb77-44d6-b685-b2cde28cc672",
    "type": "AutocompleteInput"
  }
]
class DatePicker(**kwargs)

Bases: bokeh.models.widgets.inputs.InputWidget

Calendar-based date picker widget.

max_date

property type: Date

Optional latest allowable date.

min_date

property type: Date

Optional earliest allowable date.

value

property type: Date

The initial or picked date.

[
  {
    "attributes": {
      "callback": null,
      "disabled": false,
      "doc": null,
      "id": "cba25e30-9219-4d16-93ea-0e5e9fdd8cbb",
      "max_date": null,
      "min_date": null,
      "name": null,
      "tags": [],
      "title": null,
      "value": 1443139200000.0
    },
    "id": "cba25e30-9219-4d16-93ea-0e5e9fdd8cbb",
    "type": "DatePicker"
  }
]
class DateRangeSlider(**kwargs)

Bases: bokeh.models.widgets.inputs.InputWidget

Slider-based date range selection widget.

arrows

property type: Bool

Whether to show clickable arrows on both ends of the slider.

bounds

property type: Tuple(Date, Date)

The earliest and latest allowable dates.

enabled

property type: Bool

Enable or disable this widget.

range

property type: Tuple(RelativeDelta, RelativeDelta)

[TDB]

step

property type: RelativeDelta

The step between consecutive dates.

value

property type: Tuple(Date, Date)

The initial or selected date range.

value_labels

property type: Enum(‘show’, ‘hide’, ‘change’)

Show or hide value labels on both sides of the slider.

wheel_mode

property type: Enum(‘scroll’, ‘zoom’)

Whether mouse zoom should scroll or zoom selected range (or do nothing).

[
  {
    "attributes": {
      "arrows": true,
      "bounds": null,
      "callback": null,
      "disabled": false,
      "doc": null,
      "enabled": true,
      "id": "806e1c56-e7bc-4228-982a-6636d9fe7cac",
      "name": null,
      "range": null,
      "step": {},
      "tags": [],
      "title": null,
      "value": null,
      "value_labels": "show",
      "wheel_mode": null
    },
    "id": "806e1c56-e7bc-4228-982a-6636d9fe7cac",
    "type": "DateRangeSlider"
  }
]
class InputWidget(**kwargs)

Bases: bokeh.models.widget.Widget

Abstract base class for input widgets. InputWidget` is not generally useful to instantiate on its own.

classmethod coerce_value(val)
classmethod create(*args, **kwargs)

Only called the first time we make an object, whereas __init__ is called every time it’s loaded

callback

property type: Instance(Callback)

A callback to run in the browser whenever the input’s value changes.

name

property type: String

Widget’s name.

title

property type: String

Widget’s label.

[
  {
    "attributes": {
      "callback": null,
      "disabled": false,
      "doc": null,
      "id": "8f3197de-6f6e-48b3-99c0-2edbc8ec59e6",
      "name": null,
      "tags": [],
      "title": null
    },
    "id": "8f3197de-6f6e-48b3-99c0-2edbc8ec59e6",
    "type": "InputWidget"
  }
]
class MultiSelect(**kwargs)

Bases: bokeh.models.widgets.inputs.Select

Multi-select widget.

classmethod create(*args, **kwargs)
value

property type: List(String)

Initial or selected values.

[
  {
    "attributes": {
      "callback": null,
      "disabled": false,
      "doc": null,
      "id": "c3ecef76-e941-4c11-98ed-e037ac44d7aa",
      "name": null,
      "options": [],
      "tags": [],
      "title": null,
      "value": []
    },
    "id": "c3ecef76-e941-4c11-98ed-e037ac44d7aa",
    "type": "MultiSelect"
  }
]
class Select(**kwargs)

Bases: bokeh.models.widgets.inputs.InputWidget

Single-select widget.

classmethod create(*args, **kwargs)
options

property type: List(Either(String, Dict(String, String)))

Available selection options.

value

property type: String

Initial or selected value.

[
  {
    "attributes": {
      "callback": null,
      "disabled": false,
      "doc": null,
      "id": "e6501c8d-a149-41ed-824d-1701813cf2ea",
      "name": null,
      "options": [],
      "tags": [],
      "title": null,
      "value": null
    },
    "id": "e6501c8d-a149-41ed-824d-1701813cf2ea",
    "type": "Select"
  }
]
class Slider(**kwargs)

Bases: bokeh.models.widgets.inputs.InputWidget

Slider-based number selection widget.

end

property type: Float

The maximum allowable value.

orientation

property type: Enum(‘horizontal’, ‘vertical’)

Orient the slider either horizontally (default) or vertically.

start

property type: Float

The minimum allowable value.

step

property type: Float

The step between consecutive values.

value

property type: Float

Initial or selected value.

[
  {
    "attributes": {
      "callback": null,
      "disabled": false,
      "doc": null,
      "end": null,
      "id": "cab8e209-8572-403a-ac73-2442662f87d1",
      "name": null,
      "orientation": "horizontal",
      "start": null,
      "step": null,
      "tags": [],
      "title": null,
      "value": null
    },
    "id": "cab8e209-8572-403a-ac73-2442662f87d1",
    "type": "Slider"
  }
]
class TextInput(**kwargs)

Bases: bokeh.models.widgets.inputs.InputWidget

Single-line input widget.

value

property type: String

Initial or entered text value.

[
  {
    "attributes": {
      "callback": null,
      "disabled": false,
      "doc": null,
      "id": "da2e1596-a6e4-420d-a204-73dbbe272613",
      "name": null,
      "tags": [],
      "title": null,
      "value": null
    },
    "id": "da2e1596-a6e4-420d-a204-73dbbe272613",
    "type": "TextInput"
  }
]