bokeh.models.widgets.groups

class AbstractGroup(**kwargs)[source]

Bases: bokeh.models.widgets.widget.Widget

Abstract base class for all kinds of groups.

Note

This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.

callback

property type: Instance ( Callback )

A callback to run in the browser whenever a button group is manipulated.

labels

property type: List ( String )

List of text labels contained in this group.

js_on_click(handler)[source]

Set up a handler for button check/radio box clicks including the selected indices.

on_click(handler)[source]

Set up a handler for button check/radio box clicks including the selected indices.

Parameters:handler (func) – handler function to call when button is clicked.
Returns:None
JSON Prototype
{
  "align": "start",
  "aspect_ratio": null,
  "background": null,
  "callback": null,
  "css_classes": [],
  "default_size": 300,
  "disabled": false,
  "height": null,
  "height_policy": "auto",
  "id": "13846",
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "labels": [],
  "margin": [
    5,
    5,
    5,
    5
  ],
  "max_height": null,
  "max_width": null,
  "min_height": null,
  "min_width": null,
  "name": null,
  "orientation": "horizontal",
  "sizing_mode": null,
  "subscribed_events": [],
  "tags": [],
  "visible": true,
  "width": null,
  "width_policy": "auto"
}
class ButtonGroup(**kwargs)[source]

Bases: bokeh.models.widgets.groups.AbstractGroup, bokeh.models.widgets.buttons.ButtonLike

Abstract base class for groups with items rendered as buttons.

Note

This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.

JSON Prototype
{
  "align": "start",
  "aspect_ratio": null,
  "background": null,
  "button_type": "default",
  "callback": null,
  "css_classes": [],
  "default_size": 300,
  "disabled": false,
  "height": null,
  "height_policy": "auto",
  "id": "13849",
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "labels": [],
  "margin": [
    5,
    5,
    5,
    5
  ],
  "max_height": null,
  "max_width": null,
  "min_height": null,
  "min_width": null,
  "name": null,
  "orientation": "horizontal",
  "sizing_mode": null,
  "subscribed_events": [],
  "tags": [],
  "visible": true,
  "width": null,
  "width_policy": "auto"
}
class CheckboxButtonGroup(**kwargs)[source]

Bases: bokeh.models.widgets.groups.ButtonGroup

A group of check boxes rendered as toggle buttons.

active

property type: List ( Int )

The list of indices of selected check boxes.

JSON Prototype
{
  "active": [],
  "align": "start",
  "aspect_ratio": null,
  "background": null,
  "button_type": "default",
  "callback": null,
  "css_classes": [],
  "default_size": 300,
  "disabled": false,
  "height": null,
  "height_policy": "auto",
  "id": "13850",
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "labels": [],
  "margin": [
    5,
    5,
    5,
    5
  ],
  "max_height": null,
  "max_width": null,
  "min_height": null,
  "min_width": null,
  "name": null,
  "orientation": "horizontal",
  "sizing_mode": null,
  "subscribed_events": [],
  "tags": [],
  "visible": true,
  "width": null,
  "width_policy": "auto"
}
class CheckboxGroup(**kwargs)[source]

Bases: bokeh.models.widgets.groups.Group

A group of check boxes.

active

property type: List ( Int )

The list of indices of selected check boxes.

JSON Prototype
{
  "active": [],
  "align": "start",
  "aspect_ratio": null,
  "background": null,
  "callback": null,
  "css_classes": [],
  "default_size": 300,
  "disabled": false,
  "height": null,
  "height_policy": "auto",
  "id": "13852",
  "inline": false,
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "labels": [],
  "margin": [
    5,
    5,
    5,
    5
  ],
  "max_height": null,
  "max_width": null,
  "min_height": null,
  "min_width": null,
  "name": null,
  "orientation": "horizontal",
  "sizing_mode": null,
  "subscribed_events": [],
  "tags": [],
  "visible": true,
  "width": null,
  "width_policy": "auto"
}
class Group(**kwargs)[source]

Bases: bokeh.models.widgets.groups.AbstractGroup

Abstract base class for groups with items rendered as check/radio boxes.

Note

This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.

inline

property type: Bool

Should items be arrange vertically (False) or horizontally in-line (True).

JSON Prototype
{
  "align": "start",
  "aspect_ratio": null,
  "background": null,
  "callback": null,
  "css_classes": [],
  "default_size": 300,
  "disabled": false,
  "height": null,
  "height_policy": "auto",
  "id": "13854",
  "inline": false,
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "labels": [],
  "margin": [
    5,
    5,
    5,
    5
  ],
  "max_height": null,
  "max_width": null,
  "min_height": null,
  "min_width": null,
  "name": null,
  "orientation": "horizontal",
  "sizing_mode": null,
  "subscribed_events": [],
  "tags": [],
  "visible": true,
  "width": null,
  "width_policy": "auto"
}
class RadioButtonGroup(**kwargs)[source]

Bases: bokeh.models.widgets.groups.ButtonGroup

A group of radio boxes rendered as toggle buttons.

active

property type: Int

The index of the selected radio box, or None if nothing is selected.

JSON Prototype
{
  "active": null,
  "align": "start",
  "aspect_ratio": null,
  "background": null,
  "button_type": "default",
  "callback": null,
  "css_classes": [],
  "default_size": 300,
  "disabled": false,
  "height": null,
  "height_policy": "auto",
  "id": "13856",
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "labels": [],
  "margin": [
    5,
    5,
    5,
    5
  ],
  "max_height": null,
  "max_width": null,
  "min_height": null,
  "min_width": null,
  "name": null,
  "orientation": "horizontal",
  "sizing_mode": null,
  "subscribed_events": [],
  "tags": [],
  "visible": true,
  "width": null,
  "width_policy": "auto"
}
class RadioGroup(**kwargs)[source]

Bases: bokeh.models.widgets.groups.Group

A group of radio boxes.

active

property type: Int

The index of the selected radio box, or None if nothing is selected.

JSON Prototype
{
  "active": null,
  "align": "start",
  "aspect_ratio": null,
  "background": null,
  "callback": null,
  "css_classes": [],
  "default_size": 300,
  "disabled": false,
  "height": null,
  "height_policy": "auto",
  "id": "13858",
  "inline": false,
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "labels": [],
  "margin": [
    5,
    5,
    5,
    5
  ],
  "max_height": null,
  "max_width": null,
  "min_height": null,
  "min_width": null,
  "name": null,
  "orientation": "horizontal",
  "sizing_mode": null,
  "subscribed_events": [],
  "tags": [],
  "visible": true,
  "width": null,
  "width_policy": "auto"
}