bokeh.models.widgets.sliders¶
Various kinds of slider widgets.
-
class
AbstractSlider
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.widget.Widget
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 the current Slider value changes.
DEPRECATED: use .js_on_change or .on_change with “value” or “value_throttled”
-
callback_policy
¶ property type:
Enum
(SliderCallbackPolicy
)When the value_throttled property is updated.
This parameter can take on only one of three options:
“continuous”: the callback will be executed immediately for each movement of the slider
“throttle”: the callback will be executed at most every
callback_throttle
milliseconds.“mouseup”: the callback will be executed only once when the slider is released.
The “mouseup” policy is intended for scenarios in which the callback is expensive in time.
Both Python and JS callbacks on “value_throttled” will respect this policy setting.
-
-
class
Slider
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.sliders.AbstractSlider
Slider-based number selection widget.
-
class
RangeSlider
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.sliders.AbstractSlider
Range-slider based number range selection widget.
-
class
DateSlider
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.sliders.AbstractSlider
Slider-based date selection widget.
-
class
DateRangeSlider
(**kwargs)[source]¶ Bases:
bokeh.models.widgets.sliders.AbstractSlider
Slider-based date range selection widget.
-
value_throttled
¶ property type:
Tuple
(Date
,Date
)Initial or selected value, throttled according to callback_policy.
-
property
value_as_date
¶ Convenience property to retrieve the value tuple as a tuple of date objects.
Added in version 1.1
-
property
value_as_datetime
¶ Convenience property to retrieve the value tuple as a tuple of datetime objects.
-