sliders#

Various kinds of slider widgets.

class AbstractSlider(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

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.

bar_color#

Acceptable values are:

  • any of the named CSS colors, e.g 'green', 'indigo'

  • RGB(A) hex strings, e.g., '#FF0000', '#44444444'

  • CSS4 color strings, e.g., 'rgba(255, 0, 127, 0.6)', 'rgb(0 127 0 / 1.0)', or 'hsl(60deg 100% 50% / 1.0)'

  • a 3-tuple of integers (r, g, b) between 0 and 255

  • a 4-tuple of (r, g, b, a) where r, g, b are integers between 0 and 255, and a is between 0 and 1

  • a 32-bit unsigned integer using the 0xRRGGBBAA byte order pattern

direction#
orientation#

Orient the slider either horizontally (default) or vertically.

show_value#

Whether or not show slider’s value.

title#

The slider’s label (supports math text).

tooltips#

Display the slider’s current value in a tooltip.

class CategoricalSlider(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Discrete slider allowing selection from a collection of values.

categories#

A collection of categories to choose from.

value#

Initial or selected value.

value_throttled#

Initial or throttled selected value.

class DateRangeSlider(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Slider-based date range selection widget.

end#

The maximum allowable value.

start#

The minimum allowable value.

step#

The step between consecutive values, in units of days.

value#

Initial or selected range.

property value_as_date: tuple[date, date] | None#

Convenience property to retrieve the value tuple as a tuple of date objects.

Added in version 1.1

property value_as_datetime: tuple[datetime, datetime] | None#

Convenience property to retrieve the value tuple as a tuple of datetime objects.

Added in version 1.1

value_throttled#

Initial or selected value, throttled to report only on mouseup.

class DateSlider(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Slider-based date selection widget.

end#

The maximum allowable value.

start#

The minimum allowable value.

step#

The step between consecutive values, in units of days.

value#

Initial or selected value.

property value_as_date: date | None#

Convenience property to retrieve the value as a date object.

Added in version 2.0

property value_as_datetime: datetime | None#

Convenience property to retrieve the value as a datetime object.

Added in version 2.0

value_throttled#

Initial or selected value, throttled to report only on mouseup.

class DatetimeRangeSlider(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Slider-based datetime range selection widget.

end#

The maximum allowable value.

start#

The minimum allowable value.

step#

The step between consecutive values, in units of milliseconds. Default is one hour.

value#

Initial or selected range.

property value_as_datetime: tuple[datetime, datetime] | None#

Convenience property to retrieve the value tuple as a tuple of datetime objects.

value_throttled#

Initial or selected value, throttled to report only on mouseup.

class RangeSlider(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Range-slider based number range selection widget.

end#

The maximum allowable value.

start#

The minimum allowable value.

step#

The step between consecutive values.

value#

Initial or selected range.

value_throttled#

Initial or selected value, throttled according to report only on mouseup.

class Slider(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Slider-based number selection widget.

end#

The maximum allowable value.

start#

The minimum allowable value.

step#

The step between consecutive values.

value#

Initial or selected value.

value_throttled#

Initial or selected value, throttled according to report only on mouseup.