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": "9c8556ab-8df4-4b22-93bb-9229768206e2",
      "name": null,
      "tags": [],
      "title": null,
      "value": null
    },
    "id": "9c8556ab-8df4-4b22-93bb-9229768206e2",
    "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": "86a8cf55-6c07-4823-b358-7e8db43d62e7",
      "max_date": null,
      "min_date": null,
      "name": null,
      "tags": [],
      "title": null,
      "value": 1440720000000.0
    },
    "id": "86a8cf55-6c07-4823-b358-7e8db43d62e7",
    "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": "dec25d02-81ae-45ee-b806-394f0309859e",
      "name": null,
      "range": null,
      "step": {},
      "tags": [],
      "title": null,
      "value": null,
      "value_labels": "show",
      "wheel_mode": null
    },
    "id": "dec25d02-81ae-45ee-b806-394f0309859e",
    "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": "14cf7fc3-50a0-49c7-8403-46422b70201a",
      "name": null,
      "tags": [],
      "title": null
    },
    "id": "14cf7fc3-50a0-49c7-8403-46422b70201a",
    "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": "2be13f6d-b37a-4936-a4e9-0d4ffb6db260",
      "name": null,
      "options": [],
      "tags": [],
      "title": null,
      "value": []
    },
    "id": "2be13f6d-b37a-4936-a4e9-0d4ffb6db260",
    "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": "118c69bd-e3b4-4f89-8c83-3b156bb66a5d",
      "name": null,
      "options": [],
      "tags": [],
      "title": null,
      "value": null
    },
    "id": "118c69bd-e3b4-4f89-8c83-3b156bb66a5d",
    "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": "f6598ab3-f879-4110-96d3-f7e9b784a0a9",
      "name": null,
      "orientation": "horizontal",
      "start": null,
      "step": null,
      "tags": [],
      "title": null,
      "value": null
    },
    "id": "f6598ab3-f879-4110-96d3-f7e9b784a0a9",
    "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": "261675ea-dec3-434c-96ed-ee62b775540c",
      "name": null,
      "tags": [],
      "title": null,
      "value": null
    },
    "id": "261675ea-dec3-434c-96ed-ee62b775540c",
    "type": "TextInput"
  }
]