Filter#
- class lumen.filters.base.Filter(*, field, label, schema, shared, sync_with_url, table, value, name)#
Filter components supply the filter values used by Source components to query data. .
Parameters#
type: str
default: ''
The field being filtered.
type: str
default: ''
A label for the Filter.
type: str
default: 'Filter'
String identifier for this object.
type: dict
default: None
The JSON schema provided by the Source declaring informationabout the data to be filtered.
type: bool
default: False
Whether the filter is shared across all layouts.
type: bool
default: True
Whether to sync the filter state with the URL parameters.
type: str
default: None
The table being filtered. If None applies to all tables.
type: Any
default: None
The current filter value.
Methods#
- Filter.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
Types#
The ConstantFilter allows requesting a constant value from the
The FacetFilter allows faceting the data along some dimension to
ParamFilter
reflects the value of a parameter declared on a View
.
WidgetFilter
generates a Widget from the table schema provided by a Source.
BinFilter
is a special WidgetFilter
that allows selecting from a set of bins.
DateFilter
is a WidgetFilter
specialized to select calendar dates.
DatetimeFilter
is a WidgetFilter
specialized to filter by datetimes.