altair.TopLevelSelectionParameter#
- class altair.TopLevelSelectionParameter(name=Undefined, select=Undefined, bind=Undefined, value=Undefined, views=Undefined, **kwds)#
TopLevelSelectionParameter schema wrapper.
- Parameters:
- namestr,
ParameterName
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”.
- selectdict,
SelectionType
,PointSelectionConfig
,IntervalSelectionConfig
, Literal[‘point’, ‘interval’] 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 onclick
and additional values toggled on shift-click."interval"
– to select a continuous range of data values ondrag
.
- binddict,
Binding
,BindInput
,BindRange
,BindDirect
,BindCheckbox
,LegendBinding
,BindRadioSelect
, Literal[‘legend’, ‘scales’],LegendStreamBinding
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.
- valuestr, bool, dict, None, float,
DateTime
,SelectionInit
,PrimitiveValue
,SelectionInitIntervalMapping
, Sequence[dict,SelectionInitMapping
] Initialize the selection with a mapping between projected channels or field names and initial values.
See also: init documentation.
- viewsSequence[str]
By default, top-level selections are applied to every view in the visualization. If this property is specified, selections will only be applied to views with the given names.
- namestr,
- __init__(name=Undefined, select=Undefined, bind=Undefined, value=Undefined, views=Undefined, **kwds)#
Methods
__init__
([name, select, bind, value, views])copy
([deep, ignore])Return a copy of the object.
from_dict
(dct[, validate])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, indent, sort_keys, ...])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.