BinFilter  type: bins#

class lumen.filters.base.BinFilter(*, bins, empty_select, labels, multi, default, disabled, throttled, visible, field, label, schema, shared, sync_with_url, table, value, name)#

BinFilter is a special WidgetFilter that allows selecting from a set of bins.

The bins must be declared from a list of tuples declaring the lower- and upper-bound of each bin and an optional set of labels of the same length.


Parameters#

bins

type: list[Any]
default: []
A list of bins expressed as length two tuples.

default

type: Any
default: None
The default value to use on the widget.

disabled

type: bool
default: False
Whether the filter should be disabled.

empty_select

type: bool
default: True
Add an option to Select widgets to indicate no filtering.

labels

type: list[Any]
default: None
A list of labels for each bin (optional).

multi

type: bool
default: True
Whether to use a single-value or multi-value selection widget.

throttled

type: bool
default: True
If the widget has a value_throttled parameter use that instead,ensuring that no intermediate events are generated, e.g. whendragging a slider.

visible

type: bool
default: True
Whether the filter should be visible.


Methods#

BinFilter.to_spec(context: Dict[str, Any] | None = None) Dict[str, Any]#

Exports the full specification to reconstruct this component.

Return type:

Resolved and instantiated Component object