genome_spy.selection_point

genome_spy.selection_point(name=None, /, *, clear=Undefined, encodings=Undefined, on=Undefined, toggle=Undefined, bind=Undefined, description=Undefined, persist=Undefined, push=Undefined, value=Undefined, empty=True)View on GitHub

Create a GenomeSpy selection_point parameter.

Parameters:
  • name – Parameter name. A stable name is generated when omitted.

  • clear – A string or object that defines the events that should clear the selection. Set to false to disable these events. Legend-bound point selections also reset on unmodified background clicks, independently of this property. __Default value:__ "dblclick"; no clear event for legend-bound point selections.

  • encodings – Schema-defined configuration property.

  • on – A string or object that defines the events to which the selection should listen. __Default value:__ - point selections: "click" - interval selections: - "mousedown[event.shiftKey]" when any brushed channel is zoomable - "mousedown" otherwise

  • toggle – Controls whether input events with Shift pressed add or remove selected values. - true – values can be added or removed while holding Shift. - false – only a single value can be selected at a time. __Default value:__ true when on uses "click", false otherwise.

  • bind – Populate this selection by clicking its categorical symbol legend. Plot input is disabled unless select.on is explicitly specified. Unmodified background clicks reset all legend-bound selections, independently of select.clear. Default double-click clearing is disabled.

  • description – A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.

  • persist – Whether the parameter should be persisted in bookmarks and provenance. This primarily affects GenomeSpy App behavior. Set to false for ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missing encoding.key. __Default value:__ true

  • push – Reuses the nearest same-named parameter in an ancestor scope and writes updates to it. Declare the target parameter on the ancestor first. This is useful when interaction in a child view updates state owned by a composed view, such as a parameter that controls a shared scale.

  • value – Initial raw categories, keyed by the declared encoding channel.

  • empty – Whether an empty selection matches as a predicate.

Returns:

A reusable parameter handle.

Raises:

TypeError – If the generated parameter definition is invalid.

Example

>>> selection_point().param.to_dict(validate=False)
{...}