selection Module#

selection Module#

class holoviews.selection.ColorListSelectionDisplay(color_prop='color', alpha_prop='alpha', backend=None)[source]#

Bases: SelectionDisplay

Selection display class for elements that support coloring by a vectorized color list.

class holoviews.selection.NoOpSelectionDisplay[source]#

Bases: SelectionDisplay

Selection display class that returns input element unchanged. For use with elements that don’t support displaying selections.

class holoviews.selection.OverlaySelectionDisplay(color_prop='color', is_cmap=False, supports_region=True)[source]#

Bases: SelectionDisplay

Selection display base class that represents selections by overlaying colored subsets on top of the original element in an Overlay container.

class holoviews.selection.SelectionDisplay[source]#

Bases: object

Base class for selection display classes. Selection display classes are responsible for transforming an element (or DynamicMap that produces an element) into a HoloViews object that represents the current selection state.

Bases: _base_link_selections

Operation which automatically links selections between elements in the supplied HoloViews object. Can be used a single time or be used as an instance to apply the linked selections across multiple objects.

Parameters inherited from:

holoviews.selection._base_link_selections: link_inputs, show_regions

cross_filter_mode = param.Selector(allow_refs=False, default=’intersect’, label=’Cross filter mode’, names={}, nested_refs=False, objects=[‘overwrite’, ‘intersect’], rx=<param.reactive.reactive_ops object at 0x304ce9410>)

Determines how to combine selections across different elements.

index_cols = param.List(allow_None=True, allow_refs=False, bounds=(0, None), label=’Index cols’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3043d9910>)

If provided, selection switches to index mode where all queries are expressed solely in terms of discrete values along the index_cols. All Elements given to link_selections must define the index_cols, either as explicit dimensions or by sharing an underlying Dataset that defines them.

selection_expr = param.Parameter(allow_None=True, allow_refs=False, label=’Selection expr’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x304b67e10>)

dim expression of the current selection or None to indicate that everything is selected.

selected_color = param.Color(allow_None=True, allow_named=True, allow_refs=False, label=’Selected color’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x304d1da90>)

Color of selected data, or None to use the original color of each element.

selection_mode = param.Selector(allow_refs=False, default=’overwrite’, label=’Selection mode’, names={}, nested_refs=False, objects=[‘overwrite’, ‘intersect’, ‘union’, ‘inverse’], rx=<param.reactive.reactive_ops object at 0x304d14710>)

Determines how to combine successive selections on the same element.

unselected_alpha = param.Magnitude(allow_refs=False, bounds=(0.0, 1.0), default=0.1, inclusive_bounds=(True, True), label=’Unselected alpha’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x30452a610>)

Alpha of unselected data.

unselected_color = param.Color(allow_None=True, allow_named=True, allow_refs=False, label=’Unselected color’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x304d14710>)

Color of unselected data.

Filters the provided data based on the current state of the current selection expression.

Args:

data: A Dataset type or data which can be cast to a Dataset selection_expr: Optionally provide your own selection expression

Returns:

The filtered data

Return an instance of this class, copying parameters from any existing instance provided.

The datashader colormap for selected data

Returns a parameter which reflects the current selection when applied to the supplied data, making it easy to create a callback which depends on the current selection.

Args:

data: A Dataset type or data which can be cast to a Dataset

Returns:

A parameter which reflects the current selection

The datashader colormap for unselected data