shapelets.apps.DataApp.slider#
- DataApp.slider(title: Optional[str] = None, value: Optional[Union[str, int, float, List[int], List[float], List[str]]] = None, min_value: Optional[Union[int, float]] = None, max_value: Optional[Union[int, float]] = None, step: Optional[Union[int, float]] = None, range: Optional[bool] = None, options: Optional[Union[List, dict]] = None, **additional) SliderWidget #
Creates a slider that lets a user pick a value from a set range by moving a knob.
- Parameters:
- titlestr, optional
String with the Slider title. It will be placed on top of the Slider.
- valuestr, int, float, List[int], List[float], List[str], optional
Initial value of the slider
- min_valueint or float, optional
Minimum value of the slider.
- max_valueint or float, optional
Maximum value of the slider.
- stepint or float, optional
The granularity the slider can step through values. Must greater than 0, and be divided by (max - min)
- rangebool, optional
Dual thumb mode.
- optionslist or dict, optional
Tick mark of the slider. It can be defined as list of lists ([[0,1],[“Cold”,”Warm”]]) or as a dictionary ({0: “Cold”, 1: “Warm”})
- Returns:
- SliderWidget
Examples
>>> slider = app.slider()
>>> slider = app.slider(title="Slider with default value to 5", min_value=0, max_value=10, step=1, value=5)
Bind compatibility
You can bind this widget with this:
int
float
list
Bindable as
You can bind this widget as:
If you are using range=False
int
float
If you are using range=True
tuple