altair.SelectionParameter#

class altair.SelectionParameter(name=Undefined, select=Undefined, bind=Undefined, value=Undefined, **kwds)#

SelectionParameter schema wrapper

Mapping(required=[name, select])

Attributes
nameParameterName

Required. A unique name for the selection parameter. Selection names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or “$”, or “_”) and may not start with a digit. Reserved keywords that may not be used as parameter names are “datum”, “event”, “item”, and “parent”.

selectanyOf(SelectionType, PointSelectionConfig,
:class:`IntervalSelectionConfig`)

Determines the default event processing and data query for the selection. Vega-Lite currently supports two selection types:

  • "point" – to select multiple discrete data values; the first value is selected on click and additional values toggled on shift-click.

  • "interval" – to select a continuous range of data values on drag.

bindanyOf(Binding, Mapping(required=[]), LegendBinding, string)

When set, a selection is populated by input elements (also known as dynamic query widgets) or by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection’s on property.

Legend bindings are restricted to selections that only specify a single field or encoding.

Query widget binding takes the form of Vega’s input element binding definition or can be a mapping between projected field/encodings and binding definitions.

See also: bind documentation.

valueanyOf(SelectionInit, List(SelectionInitMapping),
:class:`SelectionInitIntervalMapping`)

Initialize the selection with a mapping between projected channels or field names and initial values.

See also: init documentation.

__init__(name=Undefined, select=Undefined, bind=Undefined, value=Undefined, **kwds)#

Methods

__init__([name, select, bind, value])

copy([deep, ignore])

Return a copy of the object

from_dict(dct[, validate, _wrapper_classes])

Construct class from a dictionary representation

from_json(json_string[, validate])

Instantiate the object from a valid JSON string

resolve_references([schema])

Resolve references in the context of this object's schema or root schema.

to_dict([validate, ignore, context])

Return a dictionary representation of the object

to_json([validate, ignore, context, indent, ...])

Emit the JSON representation for this object as a string.

validate(instance[, schema])

Validate the instance against the class schema in the context of the rootschema.

validate_property(name, value[, schema])

Validate a property against property schema in the context of the rootschema