Struct vega_lite::MultiSelectionConfig
source · pub struct MultiSelectionConfig {
pub empty: Option<VgLayoutAlign>,
pub encodings: Option<Vec<SingleDefChannel>>,
pub fields: Option<Vec<String>>,
pub nearest: Option<bool>,
pub on: Option<Value>,
pub resolve: Option<SelectionResolution>,
pub toggle: Option<Translate>,
}
Expand description
The default definition for a
multi
selection. All
properties and transformations
for a multi selection definition (except type
) may be specified here.
For instance, setting multi
to {"toggle": "event.altKey"}
adds additional values to
multi selections when clicking with the alt-key pressed by default.
Fields§
§empty: Option<VgLayoutAlign>
By default, all data values are considered to lie within an empty selection.
When set to none
, empty selections contain no data values.
encodings: Option<Vec<SingleDefChannel>>
An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.
fields: Option<Vec<String>>
An array of field names whose values must match for a data tuple to fall within the selection.
nearest: Option<bool>
When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value nearest the mouse cursor is added to the selection.
See the nearest transform documentation for more information.
on: Option<Value>
A Vega event stream (object or selector) that triggers the selection. For interval selections, the event stream must specify a start and end.
resolve: Option<SelectionResolution>
With layered and multi-view displays, a strategy that determines how selections’ data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.
toggle: Option<Translate>
Controls whether data values should be toggled or only ever inserted into
multi selections. Can be true
, false
(for insertion only), or a
Vega expression.
Default value: true
, which corresponds to event.shiftKey
(i.e.,
data values are toggled when a user interacts with the shift-key pressed).
See the toggle transform documentation for more information.