From 18b61c5855fc547af2e50b5bc9cf1024cab21810 Mon Sep 17 00:00:00 2001 From: Arvind Satyanarayan Date: Fri, 15 Jan 2021 09:48:09 -0500 Subject: [PATCH] feat: move selection emptiness check to predicate (#7155) * feat: move selection emptiness check to predicate * chore: update schema [CI] * chore: update examples [CI] Co-authored-by: GitHub Actions Bot --- build/vega-lite-schema.json | 210 +++++++----------- examples/compiled/airport_connections.vg.json | 5 +- examples/compiled/bar_count_minimap.vg.json | 2 +- examples/compiled/brush_table.vg.json | 4 +- .../compiled/concat_bar_layer_circle.vg.json | 4 +- examples/compiled/concat_hover.vg.json | 4 +- examples/compiled/concat_hover_filter.vg.json | 5 +- .../compiled/interactive_area_brush.vg.json | 2 +- .../interactive_bar_select_highlight.vg.json | 6 +- examples/compiled/interactive_brush.vg.json | 2 +- .../compiled/interactive_concat_layer.vg.json | 4 +- .../interactive_dashboard_europe_pop.vg.json | 18 +- .../interactive_global_development.vg.json | 25 +-- .../compiled/interactive_index_chart.vg.json | 4 +- .../interactive_layered_crossfilter.vg.json | 4 +- ...ctive_layered_crossfilter_discrete.vg.json | 4 +- examples/compiled/interactive_legend.vg.json | 2 +- .../interactive_legend_dblclick.vg.json | 2 +- .../compiled/interactive_line_hover.vg.json | 14 +- .../interactive_multi_line_label.vg.json | 10 +- ...teractive_multi_line_pivot_tooltip.vg.json | 10 +- .../interactive_multi_line_tooltip.vg.json | 6 +- .../compiled/interactive_paintbrush.vg.json | 2 +- .../interactive_paintbrush_color.vg.json | 2 +- ...teractive_paintbrush_color_nearest.vg.json | 2 +- .../interactive_paintbrush_interval.vg.json | 2 +- .../interactive_paintbrush_simple_all.vg.json | 2 +- ...interactive_paintbrush_simple_none.vg.json | 2 +- .../interactive_query_widgets.vg.json | 4 +- .../interactive_seattle_weather.vg.json | 8 +- examples/compiled/interactive_splom.vg.json | 18 +- .../interactive_stocks_nearest_index.vg.json | 2 +- examples/compiled/isotype_grid.vg.json | 2 +- .../compiled/selection_bind_cylyr.vg.json | 4 +- .../compiled/selection_bind_origin.vg.json | 2 +- .../compiled/selection_brush_timeunit.vg.json | 4 +- .../compiled/selection_clear_brush.vg.json | 2 +- .../selection_composition_and.vg.json | 2 +- .../compiled/selection_composition_or.vg.json | 2 +- examples/compiled/selection_concat.vg.json | 2 +- examples/compiled/selection_filter.vg.json | 2 +- .../selection_filter_composition.vg.json | 2 +- examples/compiled/selection_heatmap.vg.json | 6 +- examples/compiled/selection_insert.vg.json | 2 +- .../selection_layer_bar_month.vg.json | 4 +- .../selection_multi_condition.vg.json | 4 +- .../selection_project_binned_interval.vg.json | 2 +- .../selection_project_interval.vg.json | 2 +- .../selection_project_interval_x.vg.json | 2 +- .../selection_project_interval_x_y.vg.json | 2 +- .../selection_project_interval_y.vg.json | 2 +- .../compiled/selection_project_multi.vg.json | 4 +- .../selection_project_multi_cylinders.vg.json | 4 +- ...ion_project_multi_cylinders_origin.vg.json | 6 +- .../selection_project_multi_origin.vg.json | 6 +- .../compiled/selection_project_single.vg.json | 4 +- ...selection_project_single_cylinders.vg.json | 4 +- ...on_project_single_cylinders_origin.vg.json | 6 +- .../selection_project_single_origin.vg.json | 6 +- .../selection_resolution_global.vg.json | 18 +- .../selection_resolution_intersect.vg.json | 18 +- .../selection_resolution_union.vg.json | 18 +- .../compiled/selection_toggle_altKey.vg.json | 2 +- .../selection_toggle_altKey_shiftKey.vg.json | 2 +- .../selection_toggle_shiftKey.vg.json | 2 +- .../selection_translate_brush_drag.vg.json | 2 +- ...lection_translate_brush_shift-drag.vg.json | 2 +- .../compiled/selection_type_interval.vg.json | 2 +- .../selection_type_interval_invert.png | Bin 6941 -> 6999 bytes .../selection_type_interval_invert.svg | 2 +- .../selection_type_interval_invert.vg.json | 2 +- .../compiled/selection_type_multi.vg.json | 2 +- .../compiled/selection_type_single.vg.json | 2 +- .../selection_type_single_dblclick.vg.json | 2 +- .../selection_type_single_mouseover.vg.json | 2 +- .../selection_zoom_brush_shift-wheel.vg.json | 2 +- .../selection_zoom_brush_wheel.vg.json | 2 +- examples/compiled/trellis_selections.vg.json | 4 +- examples/compiled/vconcat_flatten.vg.json | 4 +- examples/specs/airport_connections.vl.json | 5 +- examples/specs/concat_hover.vl.json | 22 +- examples/specs/concat_hover_filter.vl.json | 20 +- .../interactive_bar_select_highlight.vl.json | 25 +-- .../interactive_dashboard_europe_pop.vl.json | 24 +- .../interactive_global_development.vl.json | 24 +- examples/specs/interactive_line_hover.vl.json | 3 +- .../interactive_multi_line_label.vl.json | 11 +- ...teractive_multi_line_pivot_tooltip.vl.json | 5 +- .../interactive_multi_line_tooltip.vl.json | 11 +- .../interactive_paintbrush_simple_all.vl.json | 6 +- ...interactive_paintbrush_simple_none.vl.json | 6 +- .../airport_connections_normalized.vl.json | 5 +- .../concat_hover_filter_normalized.vl.json | 14 +- ...tive_global_development_normalized.vl.json | 24 +- .../interactive_line_hover_normalized.vl.json | 7 +- ...active_multi_line_label_normalized.vl.json | 7 +- ...ulti_line_pivot_tooltip_normalized.vl.json | 5 +- ...tive_multi_line_tooltip_normalized.vl.json | 8 +- .../specs/selection_composition_and.vl.json | 5 +- .../specs/selection_composition_or.vl.json | 5 +- examples/specs/selection_heatmap.vl.json | 6 +- .../selection_type_interval_invert.vl.json | 2 +- examples/specs/vconcat_flatten.vl.json | 2 +- site/docs/encoding/condition.md | 2 +- src/channeldef.ts | 11 +- src/compile/mark/encode/conditional.ts | 23 +- src/compile/predicate.ts | 2 +- src/compile/selection/index.ts | 1 - src/compile/selection/parse.ts | 49 ++-- src/predicate.ts | 9 +- src/selection.ts | 7 - test/compile/selection/parse.test.ts | 2 +- test/compile/selection/predicate.test.ts | 81 ++----- 113 files changed, 454 insertions(+), 556 deletions(-) diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index cce8f7dbde..e454f640ea 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -6746,6 +6746,10 @@ ], "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." }, + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "field": { "$ref": "#/definitions/Field", "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." @@ -6773,8 +6777,8 @@ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "sort": { "$ref": "#/definitions/Sort", @@ -6838,6 +6842,10 @@ ], "description": "A constant value in data domain." }, + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "legend": { "anyOf": [ { @@ -6861,8 +6869,8 @@ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "type": { "$ref": "#/definitions/Type", @@ -6905,6 +6913,10 @@ ], "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." }, + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "field": { "$ref": "#/definitions/Field", "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." @@ -6932,8 +6944,8 @@ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "sort": { "$ref": "#/definitions/Sort", @@ -6997,6 +7009,10 @@ ], "description": "A constant value in data domain." }, + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "legend": { "anyOf": [ { @@ -7020,8 +7036,8 @@ "description": "An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\n\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\n\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\n\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation." }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "type": { "$ref": "#/definitions/Type", @@ -7066,6 +7082,10 @@ ], "description": "A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\"binned\"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `\"binned\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite. To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation." }, + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "field": { "$ref": "#/definitions/Field", "description": "__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1) Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\"field\": \"foo.bar\"` and `\"field\": \"foo['bar']\"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `\"a\\\\.b\"` and `\"a\\\\[0\\\\]\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`." @@ -7086,8 +7106,8 @@ "type": "string" }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "timeUnit": { "anyOf": [ @@ -7124,9 +7144,13 @@ "ConditionalSelection>": { "additionalProperties": false, "properties": { + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "value": { "anyOf": [ @@ -7155,9 +7179,13 @@ "ConditionalSelection>": { "additionalProperties": false, "properties": { + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "value": { "anyOf": [ @@ -7180,9 +7208,13 @@ "ConditionalSelection>": { "additionalProperties": false, "properties": { + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "value": { "anyOf": [ @@ -7208,9 +7240,13 @@ "ConditionalSelection>": { "additionalProperties": false, "properties": { + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "value": { "anyOf": [ @@ -7233,9 +7269,13 @@ "ConditionalSelection>": { "additionalProperties": false, "properties": { + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "value": { "anyOf": [ @@ -7258,9 +7298,13 @@ "ConditionalSelection>": { "additionalProperties": false, "properties": { + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "value": { "anyOf": [ @@ -7286,9 +7330,13 @@ "ConditionalSelection>": { "additionalProperties": false, "properties": { + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)." + "description": "Filter using a selection name.", + "type": "string" }, "value": { "description": "A constant value in visual domain (e.g., `\"red\"` / `\"#0099ff\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).", @@ -11862,14 +11910,6 @@ ], "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation." }, - "empty": { - "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.", - "enum": [ - "all", - "none" - ], - "type": "string" - }, "encodings": { "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.", "items": { @@ -14982,21 +15022,6 @@ ], "type": "object" }, - "SelectionAnd": { - "additionalProperties": false, - "properties": { - "and": { - "items": { - "$ref": "#/definitions/SelectionComposition" - }, - "type": "array" - } - }, - "required": [ - "and" - ], - "type": "object" - }, "PredicateComposition": { "anyOf": [ { @@ -15013,22 +15038,6 @@ } ] }, - "SelectionComposition": { - "anyOf": [ - { - "$ref": "#/definitions/SelectionNot" - }, - { - "$ref": "#/definitions/SelectionAnd" - }, - { - "$ref": "#/definitions/SelectionOr" - }, - { - "type": "string" - } - ] - }, "LogicalNot": { "additionalProperties": false, "properties": { @@ -15041,18 +15050,6 @@ ], "type": "object" }, - "SelectionNot": { - "additionalProperties": false, - "properties": { - "not": { - "$ref": "#/definitions/SelectionComposition" - } - }, - "required": [ - "not" - ], - "type": "object" - }, "LogicalOr": { "additionalProperties": false, "properties": { @@ -15068,21 +15065,6 @@ ], "type": "object" }, - "SelectionOr": { - "additionalProperties": false, - "properties": { - "or": { - "items": { - "$ref": "#/definitions/SelectionComposition" - }, - "type": "array" - } - }, - "required": [ - "or" - ], - "type": "object" - }, "LookupData": { "additionalProperties": false, "properties": { @@ -19595,14 +19577,6 @@ ], "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation." }, - "empty": { - "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.", - "enum": [ - "all", - "none" - ], - "type": "string" - }, "encodings": { "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.", "items": { @@ -22377,14 +22351,6 @@ ], "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation." }, - "empty": { - "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.", - "enum": [ - "all", - "none" - ], - "type": "string" - }, "encodings": { "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.", "items": { @@ -22451,14 +22417,6 @@ ], "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation." }, - "empty": { - "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.", - "enum": [ - "all", - "none" - ], - "type": "string" - }, "encodings": { "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.", "items": { @@ -22612,9 +22570,13 @@ "SelectionPredicate": { "additionalProperties": false, "properties": { + "empty": { + "description": "By default, the predicate of empty selections returns true. Override this behavior, by setting this property `empty: false`.", + "type": "boolean" + }, "selection": { - "$ref": "#/definitions/SelectionComposition", - "description": "Filter using a selection name or a logical composition of selection names." + "description": "Filter using a selection name.", + "type": "string" } }, "required": [ @@ -29834,14 +29796,6 @@ ], "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation." }, - "empty": { - "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.", - "enum": [ - "all", - "none" - ], - "type": "string" - }, "encodings": { "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.", "items": { @@ -29908,14 +29862,6 @@ ], "description": "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation." }, - "empty": { - "description": "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.", - "enum": [ - "all", - "none" - ], - "type": "string" - }, "encodings": { "description": "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.", "items": { diff --git a/examples/compiled/airport_connections.vg.json b/examples/compiled/airport_connections.vg.json index c207a93a4b..5556a08675 100644 --- a/examples/compiled/airport_connections.vg.json +++ b/examples/compiled/airport_connections.vg.json @@ -23,7 +23,10 @@ "name": "data_0", "source": "source_1", "transform": [ - {"type": "filter", "expr": "(vlSelectionTest(\"org_store\", datum))"}, + { + "type": "filter", + "expr": "length(data(\"org_store\")) && vlSelectionTest(\"org_store\", datum)" + }, { "type": "lookup", "from": "source_2", diff --git a/examples/compiled/bar_count_minimap.vg.json b/examples/compiled/bar_count_minimap.vg.json index 2b87f41758..a5fd5cf334 100644 --- a/examples/compiled/bar_count_minimap.vg.json +++ b/examples/compiled/bar_count_minimap.vg.json @@ -11,7 +11,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" } ] }, diff --git a/examples/compiled/brush_table.vg.json b/examples/compiled/brush_table.vg.json index 9148852ca6..0d4c1b8797 100644 --- a/examples/compiled/brush_table.vg.json +++ b/examples/compiled/brush_table.vg.json @@ -36,7 +36,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" }, { "type": "window", @@ -377,7 +377,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/concat_bar_layer_circle.vg.json b/examples/compiled/concat_bar_layer_circle.vg.json index 359217a9f6..13d86385e5 100644 --- a/examples/compiled/concat_bar_layer_circle.vg.json +++ b/examples/compiled/concat_bar_layer_circle.vg.json @@ -54,7 +54,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))" + "expr": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)" }, { "type": "aggregate", @@ -329,7 +329,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": "steelblue" }, {"value": "grey"} diff --git a/examples/compiled/concat_hover.vg.json b/examples/compiled/concat_hover.vg.json index 9eac41dd64..cc80790be5 100644 --- a/examples/compiled/concat_hover.vg.json +++ b/examples/compiled/concat_hover.vg.json @@ -115,7 +115,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "(vlSelectionTest(\"hover_store\", datum))", + "test": "length(data(\"hover_store\")) && vlSelectionTest(\"hover_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -247,7 +247,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "(vlSelectionTest(\"hover_store\", datum))", + "test": "length(data(\"hover_store\")) && vlSelectionTest(\"hover_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/concat_hover_filter.vg.json b/examples/compiled/concat_hover_filter.vg.json index 00eaaf9ce9..a3991765ab 100644 --- a/examples/compiled/concat_hover_filter.vg.json +++ b/examples/compiled/concat_hover_filter.vg.json @@ -26,7 +26,10 @@ "name": "data_1", "source": "source_0", "transform": [ - {"type": "filter", "expr": "(vlSelectionTest(\"hover_store\", datum))"} + { + "type": "filter", + "expr": "length(data(\"hover_store\")) && vlSelectionTest(\"hover_store\", datum)" + } ] }, { diff --git a/examples/compiled/interactive_area_brush.vg.json b/examples/compiled/interactive_area_brush.vg.json index 59f490ff4d..49c36df21f 100644 --- a/examples/compiled/interactive_area_brush.vg.json +++ b/examples/compiled/interactive_area_brush.vg.json @@ -26,7 +26,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" }, { "type": "aggregate", diff --git a/examples/compiled/interactive_bar_select_highlight.vg.json b/examples/compiled/interactive_bar_select_highlight.vg.json index d975f1b37b..148d09a634 100644 --- a/examples/compiled/interactive_bar_select_highlight.vg.json +++ b/examples/compiled/interactive_bar_select_highlight.vg.json @@ -140,18 +140,18 @@ "cursor": {"value": "pointer"}, "fillOpacity": [ { - "test": "!(length(data(\"select_store\"))) || (vlSelectionTest(\"select_store\", datum))", + "test": "!length(data(\"select_store\")) || vlSelectionTest(\"select_store\", datum)", "value": 1 }, {"value": 0.3} ], "strokeWidth": [ { - "test": "(!(length(data(\"select_store\"))) || (vlSelectionTest(\"select_store\", datum))) && (length(data(\"select_store\")))", + "test": "length(data(\"select_store\")) && vlSelectionTest(\"select_store\", datum)", "value": 2 }, { - "test": "(vlSelectionTest(\"highlight_store\", datum))", + "test": "length(data(\"highlight_store\")) && vlSelectionTest(\"highlight_store\", datum)", "value": 1 }, {"value": 0} diff --git a/examples/compiled/interactive_brush.vg.json b/examples/compiled/interactive_brush.vg.json index b80a4cec5d..14ada8c39e 100644 --- a/examples/compiled/interactive_brush.vg.json +++ b/examples/compiled/interactive_brush.vg.json @@ -321,7 +321,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/interactive_concat_layer.vg.json b/examples/compiled/interactive_concat_layer.vg.json index c8cae629cc..22ecd986c2 100644 --- a/examples/compiled/interactive_concat_layer.vg.json +++ b/examples/compiled/interactive_concat_layer.vg.json @@ -54,7 +54,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))" + "expr": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)" }, { "type": "aggregate", @@ -343,7 +343,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": "steelblue" }, {"value": "grey"} diff --git a/examples/compiled/interactive_dashboard_europe_pop.vg.json b/examples/compiled/interactive_dashboard_europe_pop.vg.json index 51080d5680..0dd4ae7931 100644 --- a/examples/compiled/interactive_dashboard_europe_pop.vg.json +++ b/examples/compiled/interactive_dashboard_europe_pop.vg.json @@ -586,10 +586,10 @@ "update": { "fill": [ { - "test": "!(length(data(\"brush_store\"))) || (!(vlSelectionTest(\"brush_store\", datum)))", - "value": "steelblue" + "test": "length(data(\"brush_store\")) && vlSelectionTest(\"brush_store\", datum)", + "value": "goldenrod" }, - {"value": "goldenrod"} + {"value": "steelblue"} ], "ariaRoleDescription": {"value": "bar"}, "description": { @@ -907,10 +907,10 @@ "update": { "fill": [ { - "test": "!(length(data(\"brush_store\"))) || (!(vlSelectionTest(\"brush_store\", datum)))", - "value": "steelblue" + "test": "length(data(\"brush_store\")) && vlSelectionTest(\"brush_store\", datum)", + "value": "goldenrod" }, - {"value": "goldenrod"} + {"value": "steelblue"} ], "ariaRoleDescription": {"value": "bar"}, "description": { @@ -1307,10 +1307,10 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (!(vlSelectionTest(\"brush_store\", datum)))", - "value": "steelblue" + "test": "length(data(\"brush_store\")) && vlSelectionTest(\"brush_store\", datum)", + "value": "goldenrod" }, - {"value": "goldenrod"} + {"value": "steelblue"} ], "ariaRoleDescription": {"value": "point"}, "description": { diff --git a/examples/compiled/interactive_global_development.vg.json b/examples/compiled/interactive_global_development.vg.json index 2c84ab64ae..9b1dca2dee 100644 --- a/examples/compiled/interactive_global_development.vg.json +++ b/examples/compiled/interactive_global_development.vg.json @@ -42,7 +42,7 @@ {"type": "filter", "expr": "datum[\"country\"]===\"Afghanistan\""}, { "type": "filter", - "expr": "!(length(data(\"year_store\"))) || (vlSelectionTest(\"year_store\", datum))" + "expr": "!length(data(\"year_store\")) || vlSelectionTest(\"year_store\", datum)" } ] }, @@ -65,7 +65,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"year_store\"))) || (vlSelectionTest(\"year_store\", datum))" + "expr": "!length(data(\"year_store\")) || vlSelectionTest(\"year_store\", datum)" }, { "type": "filter", @@ -79,7 +79,7 @@ "transform": [ { "type": "filter", - "expr": "(!(length(data(\"year_store\"))) || (vlSelectionTest(\"year_store\", datum))) && (((vlSelectionTest(\"clicked_store\", datum))) || ((vlSelectionTest(\"hovered_store\", datum))))" + "expr": "(!length(data(\"year_store\")) || vlSelectionTest(\"year_store\", datum)) && ((length(data(\"clicked_store\")) && vlSelectionTest(\"clicked_store\", datum)) || (length(data(\"hovered_store\")) && vlSelectionTest(\"hovered_store\", datum)))" }, { "type": "filter", @@ -93,11 +93,11 @@ "transform": [ { "type": "filter", - "expr": "(vlSelectionTest(\"hovered_store\", datum))" + "expr": "length(data(\"hovered_store\")) && vlSelectionTest(\"hovered_store\", datum)" }, { "type": "filter", - "expr": "!(!(length(data(\"year_store\"))) || (vlSelectionTest(\"year_store\", datum)))" + "expr": "!(!length(data(\"year_store\")) || vlSelectionTest(\"year_store\", datum))" }, { "type": "filter", @@ -166,23 +166,12 @@ "name": "hovered_tuple_fields", "value": [{"type": "E", "field": "country"}] }, - { - "name": "hovered_toggle", - "value": false, - "on": [ - { - "events": [{"source": "scope", "type": "mouseover"}], - "update": "event.shiftKey" - }, - {"events": [{"source": "view", "type": "dblclick"}], "update": "false"} - ] - }, { "name": "hovered_modify", "on": [ { "events": {"signal": "hovered_tuple"}, - "update": "modify(\"hovered_store\", hovered_toggle ? null : hovered_tuple, hovered_toggle ? null : true, hovered_toggle ? hovered_tuple : null)" + "update": "modify(\"hovered_store\", hovered_tuple, true)" } ] }, @@ -277,7 +266,7 @@ "stroke": {"value": "lightgray"}, "opacity": [ { - "test": "((vlSelectionTest(\"hovered_store\", datum))) || ((vlSelectionTest(\"clicked_store\", datum)))", + "test": "(length(data(\"hovered_store\")) && vlSelectionTest(\"hovered_store\", datum)) || (length(data(\"clicked_store\")) && vlSelectionTest(\"clicked_store\", datum))", "value": 0.8 }, {"value": 0} diff --git a/examples/compiled/interactive_index_chart.vg.json b/examples/compiled/interactive_index_chart.vg.json index dd2b7b19fb..94b5914f0d 100644 --- a/examples/compiled/interactive_index_chart.vg.json +++ b/examples/compiled/interactive_index_chart.vg.json @@ -37,7 +37,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"index_store\"))) || (vlSelectionTest(\"index_store\", datum))" + "expr": "!length(data(\"index_store\")) || vlSelectionTest(\"index_store\", datum)" } ] }, @@ -65,7 +65,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"index_store\"))) || (vlSelectionTest(\"index_store\", datum))" + "expr": "!length(data(\"index_store\")) || vlSelectionTest(\"index_store\", datum)" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter.vg.json b/examples/compiled/interactive_layered_crossfilter.vg.json index 90d75ca2ec..b2d5350c4e 100644 --- a/examples/compiled/interactive_layered_crossfilter.vg.json +++ b/examples/compiled/interactive_layered_crossfilter.vg.json @@ -69,7 +69,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" }, { "type": "aggregate", @@ -107,7 +107,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json index 409e8ae751..4ce170285d 100644 --- a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json +++ b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json @@ -69,7 +69,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" }, { "type": "aggregate", @@ -107,7 +107,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" } ] }, diff --git a/examples/compiled/interactive_legend.vg.json b/examples/compiled/interactive_legend.vg.json index e3b7645408..5e1c0ccd2e 100644 --- a/examples/compiled/interactive_legend.vg.json +++ b/examples/compiled/interactive_legend.vg.json @@ -147,7 +147,7 @@ "fill": {"scale": "color", "field": "series"}, "opacity": [ { - "test": "!(length(data(\"industry_store\"))) || (vlSelectionTest(\"industry_store\", datum))", + "test": "!length(data(\"industry_store\")) || vlSelectionTest(\"industry_store\", datum)", "value": 1 }, {"value": 0.2} diff --git a/examples/compiled/interactive_legend_dblclick.vg.json b/examples/compiled/interactive_legend_dblclick.vg.json index 6b66c471a1..f76010964b 100644 --- a/examples/compiled/interactive_legend_dblclick.vg.json +++ b/examples/compiled/interactive_legend_dblclick.vg.json @@ -147,7 +147,7 @@ "fill": {"scale": "color", "field": "series"}, "opacity": [ { - "test": "!(length(data(\"industry_store\"))) || (vlSelectionTest(\"industry_store\", datum))", + "test": "!length(data(\"industry_store\")) || vlSelectionTest(\"industry_store\", datum)", "value": 1 }, {"value": 0.2} diff --git a/examples/compiled/interactive_line_hover.vg.json b/examples/compiled/interactive_line_hover.vg.json index 93af4d1b44..3639c09689 100644 --- a/examples/compiled/interactive_line_hover.vg.json +++ b/examples/compiled/interactive_line_hover.vg.json @@ -117,7 +117,7 @@ "strokeWidth": {"value": 8}, "opacity": [ { - "test": "!(length(data(\"hover_store\"))) || (vlSelectionTest(\"hover_store\", datum))", + "test": "!length(data(\"hover_store\")) || vlSelectionTest(\"hover_store\", datum)", "value": 1 }, {"value": 0.2} @@ -163,7 +163,7 @@ "update": { "stroke": [ { - "test": "!(length(data(\"hover_store\"))) || (vlSelectionTest(\"hover_store\", datum))", + "test": "!length(data(\"hover_store\")) || vlSelectionTest(\"hover_store\", datum)", "scale": "color", "field": "symbol" }, @@ -171,7 +171,7 @@ ], "opacity": [ { - "test": "!(length(data(\"hover_store\"))) || (vlSelectionTest(\"hover_store\", datum))", + "test": "!length(data(\"hover_store\")) || vlSelectionTest(\"hover_store\", datum)", "value": 1 }, {"value": 0.2} @@ -199,7 +199,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"hover_store\"))) || (vlSelectionTest(\"hover_store\", datum))", + "test": "!length(data(\"hover_store\")) || vlSelectionTest(\"hover_store\", datum)", "scale": "color", "field": "symbol" }, @@ -207,7 +207,7 @@ ], "opacity": [ { - "test": "!(length(data(\"hover_store\"))) || (vlSelectionTest(\"hover_store\", datum))", + "test": "!length(data(\"hover_store\")) || vlSelectionTest(\"hover_store\", datum)", "value": 1 }, {"value": 0.2} @@ -234,7 +234,7 @@ "dx": {"value": 4}, "fill": [ { - "test": "!(length(data(\"hover_store\"))) || (vlSelectionTest(\"hover_store\", datum))", + "test": "!length(data(\"hover_store\")) || vlSelectionTest(\"hover_store\", datum)", "scale": "color", "field": "symbol" }, @@ -242,7 +242,7 @@ ], "opacity": [ { - "test": "!(length(data(\"hover_store\"))) || (vlSelectionTest(\"hover_store\", datum))", + "test": "!length(data(\"hover_store\")) || vlSelectionTest(\"hover_store\", datum)", "value": 1 }, {"value": 0.2} diff --git a/examples/compiled/interactive_multi_line_label.vg.json b/examples/compiled/interactive_multi_line_label.vg.json index 79df0b3ec5..3e5f7bea26 100644 --- a/examples/compiled/interactive_multi_line_label.vg.json +++ b/examples/compiled/interactive_multi_line_label.vg.json @@ -26,7 +26,10 @@ "name": "data_1", "source": "source_0", "transform": [ - {"type": "filter", "expr": "(vlSelectionTest(\"label_store\", datum))"} + { + "type": "filter", + "expr": "length(data(\"label_store\")) && vlSelectionTest(\"label_store\", datum)" + } ] }, { @@ -167,7 +170,10 @@ "encode": { "update": { "opacity": [ - {"test": "(vlSelectionTest(\"label_store\", datum))", "value": 1}, + { + "test": "length(data(\"label_store\")) && vlSelectionTest(\"label_store\", datum)", + "value": 1 + }, {"value": 0} ], "fill": {"value": "transparent"}, diff --git a/examples/compiled/interactive_multi_line_pivot_tooltip.vg.json b/examples/compiled/interactive_multi_line_pivot_tooltip.vg.json index e48da176f0..a46e52142c 100644 --- a/examples/compiled/interactive_multi_line_pivot_tooltip.vg.json +++ b/examples/compiled/interactive_multi_line_pivot_tooltip.vg.json @@ -33,7 +33,10 @@ "name": "data_1", "source": "source_0", "transform": [ - {"type": "filter", "expr": "(vlSelectionTest(\"hover_store\", datum))"}, + { + "type": "filter", + "expr": "length(data(\"hover_store\")) && vlSelectionTest(\"hover_store\", datum)" + }, { "type": "filter", "expr": "(isDate(datum[\"date\"]) || (isValid(datum[\"date\"]) && isFinite(+datum[\"date\"]))) && isValid(datum[\"price\"]) && isFinite(+datum[\"price\"])" @@ -169,7 +172,10 @@ "update": { "stroke": {"value": "black"}, "opacity": [ - {"test": "(vlSelectionTest(\"hover_store\", datum))", "value": 0.3}, + { + "test": "length(data(\"hover_store\")) && vlSelectionTest(\"hover_store\", datum)", + "value": 0.3 + }, {"value": 0} ], "tooltip": { diff --git a/examples/compiled/interactive_multi_line_tooltip.vg.json b/examples/compiled/interactive_multi_line_tooltip.vg.json index 1c4696ffd2..9ae455cc63 100644 --- a/examples/compiled/interactive_multi_line_tooltip.vg.json +++ b/examples/compiled/interactive_multi_line_tooltip.vg.json @@ -139,10 +139,10 @@ "update": { "stroke": [ { - "test": "(!(vlSelectionTest(\"hover_store\", datum)))", - "value": "transparent" + "test": "length(data(\"hover_store\")) && vlSelectionTest(\"hover_store\", datum)", + "value": "black" }, - {"value": "black"} + {"value": "transparent"} ], "tooltip": { "signal": "{\"date (year-month-date)\": timeFormat(datum[\"yearmonthdate_date\"], timeUnitSpecifier([\"year\",\"month\",\"date\"], {\"year-month\":\"%b %Y \",\"year-month-date\":\"%b %d, %Y \"})), \"temp_max\": format(datum[\"temp_max\"], \"\"), \"temp_min\": format(datum[\"temp_min\"], \"\")}" diff --git a/examples/compiled/interactive_paintbrush.vg.json b/examples/compiled/interactive_paintbrush.vg.json index be0a6d3d92..d66ffbba69 100644 --- a/examples/compiled/interactive_paintbrush.vg.json +++ b/examples/compiled/interactive_paintbrush.vg.json @@ -93,7 +93,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"paintbrush_store\"))) || (vlSelectionTest(\"paintbrush_store\", datum))", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", "value": 300 }, {"value": 50} diff --git a/examples/compiled/interactive_paintbrush_color.vg.json b/examples/compiled/interactive_paintbrush_color.vg.json index a1f4525418..913a4f1e07 100644 --- a/examples/compiled/interactive_paintbrush_color.vg.json +++ b/examples/compiled/interactive_paintbrush_color.vg.json @@ -81,7 +81,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"paintbrush_store\"))) || (vlSelectionTest(\"paintbrush_store\", datum))", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/interactive_paintbrush_color_nearest.vg.json b/examples/compiled/interactive_paintbrush_color_nearest.vg.json index 5e6b88f43f..db0b103e36 100644 --- a/examples/compiled/interactive_paintbrush_color_nearest.vg.json +++ b/examples/compiled/interactive_paintbrush_color_nearest.vg.json @@ -85,7 +85,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"paintbrush_store\"))) || (vlSelectionTest(\"paintbrush_store\", datum))", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/interactive_paintbrush_interval.vg.json b/examples/compiled/interactive_paintbrush_interval.vg.json index 27050b3ce1..a7bc7dbf2a 100644 --- a/examples/compiled/interactive_paintbrush_interval.vg.json +++ b/examples/compiled/interactive_paintbrush_interval.vg.json @@ -319,7 +319,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"paintbrush_store\"))) || (vlSelectionTest(\"paintbrush_store\", datum))", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", "value": 300 }, {"value": 50} diff --git a/examples/compiled/interactive_paintbrush_simple_all.vg.json b/examples/compiled/interactive_paintbrush_simple_all.vg.json index fbd68192db..a38ef16bf3 100644 --- a/examples/compiled/interactive_paintbrush_simple_all.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_all.vg.json @@ -88,7 +88,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"paintbrush_store\"))) || (vlSelectionTest(\"paintbrush_store\", datum))", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", "value": 300 }, {"value": 50} diff --git a/examples/compiled/interactive_paintbrush_simple_none.vg.json b/examples/compiled/interactive_paintbrush_simple_none.vg.json index 4a8099562f..3c5ea19186 100644 --- a/examples/compiled/interactive_paintbrush_simple_none.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_none.vg.json @@ -88,7 +88,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "(vlSelectionTest(\"paintbrush_store\", datum))", + "test": "length(data(\"paintbrush_store\")) && vlSelectionTest(\"paintbrush_store\", datum)", "value": 300 }, {"value": 50} diff --git a/examples/compiled/interactive_query_widgets.vg.json b/examples/compiled/interactive_query_widgets.vg.json index e6eff5c385..545c77863f 100644 --- a/examples/compiled/interactive_query_widgets.vg.json +++ b/examples/compiled/interactive_query_widgets.vg.json @@ -44,7 +44,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"CylYr_store\"))) || (vlSelectionTest(\"CylYr_store\", datum))" + "expr": "!length(data(\"CylYr_store\")) || vlSelectionTest(\"CylYr_store\", datum)" }, { "type": "filter", @@ -108,7 +108,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"CylYr_store\"))) || (vlSelectionTest(\"CylYr_store\", datum))", + "test": "!length(data(\"CylYr_store\")) || vlSelectionTest(\"CylYr_store\", datum)", "scale": "color", "field": "Origin" }, diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index e40d62c8b2..2c14505cbb 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -24,7 +24,7 @@ }, { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" }, { "type": "aggregate", @@ -41,7 +41,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"click_store\"))) || (vlSelectionTest(\"click_store\", datum))" + "expr": "!length(data(\"click_store\")) || vlSelectionTest(\"click_store\", datum)" }, { "field": "date", @@ -311,7 +311,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "weather" }, @@ -485,7 +485,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"click_store\"))) || (vlSelectionTest(\"click_store\", datum))", + "test": "!length(data(\"click_store\")) || vlSelectionTest(\"click_store\", datum)", "scale": "color", "field": "weather" }, diff --git a/examples/compiled/interactive_splom.vg.json b/examples/compiled/interactive_splom.vg.json index ea2565fae9..977b8fa8e7 100644 --- a/examples/compiled/interactive_splom.vg.json +++ b/examples/compiled/interactive_splom.vg.json @@ -539,7 +539,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -1047,7 +1047,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -1467,7 +1467,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -1976,7 +1976,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -2398,7 +2398,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -2903,7 +2903,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -3327,7 +3327,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -3836,7 +3836,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -4348,7 +4348,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, diff --git a/examples/compiled/interactive_stocks_nearest_index.vg.json b/examples/compiled/interactive_stocks_nearest_index.vg.json index e6ac527703..d2e215a442 100644 --- a/examples/compiled/interactive_stocks_nearest_index.vg.json +++ b/examples/compiled/interactive_stocks_nearest_index.vg.json @@ -28,7 +28,7 @@ "transform": [ { "type": "filter", - "expr": "(index.date) && (!(length(data(\"index_store\"))) || (vlSelectionTest(\"index_store\", datum)))" + "expr": "(index.date) && (!length(data(\"index_store\")) || vlSelectionTest(\"index_store\", datum))" }, { "type": "filter", diff --git a/examples/compiled/isotype_grid.vg.json b/examples/compiled/isotype_grid.vg.json index d55f788ff9..cfd0b76d02 100644 --- a/examples/compiled/isotype_grid.vg.json +++ b/examples/compiled/isotype_grid.vg.json @@ -404,7 +404,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"highlight_store\"))) || (vlSelectionTest(\"highlight_store\", datum))", + "test": "!length(data(\"highlight_store\")) || vlSelectionTest(\"highlight_store\", datum)", "value": "rgb(194,81,64)" }, {"value": "rgb(167,165,156)"} diff --git a/examples/compiled/selection_bind_cylyr.vg.json b/examples/compiled/selection_bind_cylyr.vg.json index c5c5b0bd4e..c4ef29ebb6 100644 --- a/examples/compiled/selection_bind_cylyr.vg.json +++ b/examples/compiled/selection_bind_cylyr.vg.json @@ -75,7 +75,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"CylYr_store\"))) || (vlSelectionTest(\"CylYr_store\", datum))", + "test": "!length(data(\"CylYr_store\")) || vlSelectionTest(\"CylYr_store\", datum)", "scale": "color", "field": "Origin" }, @@ -89,7 +89,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"CylYr_store\"))) || (vlSelectionTest(\"CylYr_store\", datum))", + "test": "!length(data(\"CylYr_store\")) || vlSelectionTest(\"CylYr_store\", datum)", "value": 100 }, {"value": 50} diff --git a/examples/compiled/selection_bind_origin.vg.json b/examples/compiled/selection_bind_origin.vg.json index 4bc3e045ef..8b6c71f01f 100644 --- a/examples/compiled/selection_bind_origin.vg.json +++ b/examples/compiled/selection_bind_origin.vg.json @@ -64,7 +64,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"org_store\"))) || (vlSelectionTest(\"org_store\", datum))", + "test": "!length(data(\"org_store\")) || vlSelectionTest(\"org_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_brush_timeunit.vg.json b/examples/compiled/selection_brush_timeunit.vg.json index be5f7c6b25..f18b6c35b9 100644 --- a/examples/compiled/selection_brush_timeunit.vg.json +++ b/examples/compiled/selection_brush_timeunit.vg.json @@ -34,7 +34,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" }, { "field": "date", @@ -305,7 +305,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "value": "goldenrod" }, {"value": "steelblue"} diff --git a/examples/compiled/selection_clear_brush.vg.json b/examples/compiled/selection_clear_brush.vg.json index ca4334a350..b42df697ed 100644 --- a/examples/compiled/selection_clear_brush.vg.json +++ b/examples/compiled/selection_clear_brush.vg.json @@ -314,7 +314,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_composition_and.vg.json b/examples/compiled/selection_composition_and.vg.json index b548fb415a..21ffb0e8c4 100644 --- a/examples/compiled/selection_composition_and.vg.json +++ b/examples/compiled/selection_composition_and.vg.json @@ -575,7 +575,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"alex_store\")) || length(data(\"morgan_store\"))) || ((vlSelectionTest(\"alex_store\", datum)) && (vlSelectionTest(\"morgan_store\", datum)))", + "test": "(!length(data(\"alex_store\")) || vlSelectionTest(\"alex_store\", datum)) && (!length(data(\"morgan_store\")) || vlSelectionTest(\"morgan_store\", datum))", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_composition_or.vg.json b/examples/compiled/selection_composition_or.vg.json index 0cd0e1c478..df9aeacf15 100644 --- a/examples/compiled/selection_composition_or.vg.json +++ b/examples/compiled/selection_composition_or.vg.json @@ -575,7 +575,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"alex_store\")) || length(data(\"morgan_store\"))) || ((vlSelectionTest(\"alex_store\", datum)) || (vlSelectionTest(\"morgan_store\", datum)))", + "test": "(!length(data(\"alex_store\")) || vlSelectionTest(\"alex_store\", datum)) || (!length(data(\"morgan_store\")) || vlSelectionTest(\"morgan_store\", datum))", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_concat.vg.json b/examples/compiled/selection_concat.vg.json index 90ed73fe31..3201351e9b 100644 --- a/examples/compiled/selection_concat.vg.json +++ b/examples/compiled/selection_concat.vg.json @@ -584,7 +584,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "value": "steelblue" }, {"value": "red"} diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json index 72e865a58e..2e804fae2b 100644 --- a/examples/compiled/selection_filter.vg.json +++ b/examples/compiled/selection_filter.vg.json @@ -22,7 +22,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" }, { "type": "filter", diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json index a29a824e81..35910995b7 100644 --- a/examples/compiled/selection_filter_composition.vg.json +++ b/examples/compiled/selection_filter_composition.vg.json @@ -22,7 +22,7 @@ "transform": [ { "type": "filter", - "expr": "(datum.Weight_in_lbs > 3000) && (!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum)))" + "expr": "(datum.Weight_in_lbs > 3000) && (!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum))" }, { "type": "filter", diff --git a/examples/compiled/selection_heatmap.vg.json b/examples/compiled/selection_heatmap.vg.json index 7efbaf87ce..03f1a9feb1 100644 --- a/examples/compiled/selection_heatmap.vg.json +++ b/examples/compiled/selection_heatmap.vg.json @@ -99,21 +99,21 @@ "fill": {"scale": "fill", "field": "count"}, "stroke": [ { - "test": "(!(length(data(\"highlight_store\"))) || (vlSelectionTest(\"highlight_store\", datum))) && (length(data(\"highlight_store\")))", + "test": "length(data(\"highlight_store\")) && vlSelectionTest(\"highlight_store\", datum)", "value": "black" }, {"value": null} ], "opacity": [ { - "test": "!(length(data(\"highlight_store\"))) || (vlSelectionTest(\"highlight_store\", datum))", + "test": "!length(data(\"highlight_store\")) || vlSelectionTest(\"highlight_store\", datum)", "value": 1 }, {"value": 0.5} ], "zindex": [ { - "test": "!(length(data(\"highlight_store\"))) || (vlSelectionTest(\"highlight_store\", datum))", + "test": "!length(data(\"highlight_store\")) || vlSelectionTest(\"highlight_store\", datum)", "value": 1 }, {"value": 0} diff --git a/examples/compiled/selection_insert.vg.json b/examples/compiled/selection_insert.vg.json index 63e6283bc4..a8ab7d3ec1 100644 --- a/examples/compiled/selection_insert.vg.json +++ b/examples/compiled/selection_insert.vg.json @@ -69,7 +69,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"paintbrush_store\"))) || (vlSelectionTest(\"paintbrush_store\", datum))", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_layer_bar_month.vg.json b/examples/compiled/selection_layer_bar_month.vg.json index 054cd6feb3..5e6abd859c 100644 --- a/examples/compiled/selection_layer_bar_month.vg.json +++ b/examples/compiled/selection_layer_bar_month.vg.json @@ -25,7 +25,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" }, { "type": "aggregate", @@ -283,7 +283,7 @@ "fill": {"value": "#4c78a8"}, "opacity": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "value": 1 }, {"value": 0.7} diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index 100be47fe9..1428dc4661 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -351,11 +351,11 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"hoverbrush_store\"))) || (vlSelectionTest(\"hoverbrush_store\", datum))", + "test": "!length(data(\"hoverbrush_store\")) || vlSelectionTest(\"hoverbrush_store\", datum)", "value": "teal" }, { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "value": "skyblue" }, {"value": "grey"} diff --git a/examples/compiled/selection_project_binned_interval.vg.json b/examples/compiled/selection_project_binned_interval.vg.json index debbef9160..0dac11e87c 100644 --- a/examples/compiled/selection_project_binned_interval.vg.json +++ b/examples/compiled/selection_project_binned_interval.vg.json @@ -36,7 +36,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))" + "expr": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)" }, { "type": "aggregate", diff --git a/examples/compiled/selection_project_interval.vg.json b/examples/compiled/selection_project_interval.vg.json index 6b8e1ecc7f..b8b69a7333 100644 --- a/examples/compiled/selection_project_interval.vg.json +++ b/examples/compiled/selection_project_interval.vg.json @@ -298,7 +298,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_project_interval_x.vg.json b/examples/compiled/selection_project_interval_x.vg.json index be22630490..a6c7b0a79e 100644 --- a/examples/compiled/selection_project_interval_x.vg.json +++ b/examples/compiled/selection_project_interval_x.vg.json @@ -241,7 +241,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_project_interval_x_y.vg.json b/examples/compiled/selection_project_interval_x_y.vg.json index 6b8e1ecc7f..b8b69a7333 100644 --- a/examples/compiled/selection_project_interval_x_y.vg.json +++ b/examples/compiled/selection_project_interval_x_y.vg.json @@ -298,7 +298,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_project_interval_y.vg.json b/examples/compiled/selection_project_interval_y.vg.json index 3d8bd25ad2..7b2f1c4eb3 100644 --- a/examples/compiled/selection_project_interval_y.vg.json +++ b/examples/compiled/selection_project_interval_y.vg.json @@ -241,7 +241,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_project_multi.vg.json b/examples/compiled/selection_project_multi.vg.json index 51fa364eb6..6510ed917c 100644 --- a/examples/compiled/selection_project_multi.vg.json +++ b/examples/compiled/selection_project_multi.vg.json @@ -78,7 +78,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -92,7 +92,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": 200 }, {"value": 50} diff --git a/examples/compiled/selection_project_multi_cylinders.vg.json b/examples/compiled/selection_project_multi_cylinders.vg.json index 4541263159..67e9703503 100644 --- a/examples/compiled/selection_project_multi_cylinders.vg.json +++ b/examples/compiled/selection_project_multi_cylinders.vg.json @@ -80,7 +80,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -94,7 +94,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": 200 }, {"value": 50} diff --git a/examples/compiled/selection_project_multi_cylinders_origin.vg.json b/examples/compiled/selection_project_multi_cylinders_origin.vg.json index deb2c1d39d..87c82d1174 100644 --- a/examples/compiled/selection_project_multi_cylinders_origin.vg.json +++ b/examples/compiled/selection_project_multi_cylinders_origin.vg.json @@ -83,7 +83,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -97,14 +97,14 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": 200 }, {"value": 50} ], "shape": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "shape", "field": "Origin" }, diff --git a/examples/compiled/selection_project_multi_origin.vg.json b/examples/compiled/selection_project_multi_origin.vg.json index 6ed38eaef1..979e2de262 100644 --- a/examples/compiled/selection_project_multi_origin.vg.json +++ b/examples/compiled/selection_project_multi_origin.vg.json @@ -77,7 +77,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -91,14 +91,14 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": 200 }, {"value": 50} ], "shape": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "shape", "field": "Origin" }, diff --git a/examples/compiled/selection_project_single.vg.json b/examples/compiled/selection_project_single.vg.json index 51fa364eb6..6510ed917c 100644 --- a/examples/compiled/selection_project_single.vg.json +++ b/examples/compiled/selection_project_single.vg.json @@ -78,7 +78,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -92,7 +92,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": 200 }, {"value": 50} diff --git a/examples/compiled/selection_project_single_cylinders.vg.json b/examples/compiled/selection_project_single_cylinders.vg.json index 4541263159..67e9703503 100644 --- a/examples/compiled/selection_project_single_cylinders.vg.json +++ b/examples/compiled/selection_project_single_cylinders.vg.json @@ -80,7 +80,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -94,7 +94,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": 200 }, {"value": 50} diff --git a/examples/compiled/selection_project_single_cylinders_origin.vg.json b/examples/compiled/selection_project_single_cylinders_origin.vg.json index deb2c1d39d..87c82d1174 100644 --- a/examples/compiled/selection_project_single_cylinders_origin.vg.json +++ b/examples/compiled/selection_project_single_cylinders_origin.vg.json @@ -83,7 +83,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -97,14 +97,14 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": 200 }, {"value": 50} ], "shape": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "shape", "field": "Origin" }, diff --git a/examples/compiled/selection_project_single_origin.vg.json b/examples/compiled/selection_project_single_origin.vg.json index 6ed38eaef1..979e2de262 100644 --- a/examples/compiled/selection_project_single_origin.vg.json +++ b/examples/compiled/selection_project_single_origin.vg.json @@ -77,7 +77,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -91,14 +91,14 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": 200 }, {"value": 50} ], "shape": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "shape", "field": "Origin" }, diff --git a/examples/compiled/selection_resolution_global.vg.json b/examples/compiled/selection_resolution_global.vg.json index 8055a64e17..ca0a20cd5c 100644 --- a/examples/compiled/selection_resolution_global.vg.json +++ b/examples/compiled/selection_resolution_global.vg.json @@ -380,7 +380,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, @@ -792,7 +792,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, @@ -1139,7 +1139,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, @@ -1550,7 +1550,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, @@ -1899,7 +1899,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, @@ -2308,7 +2308,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, @@ -2659,7 +2659,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, @@ -3070,7 +3070,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, @@ -3484,7 +3484,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, diff --git a/examples/compiled/selection_resolution_intersect.vg.json b/examples/compiled/selection_resolution_intersect.vg.json index a2b48599e8..be6ea11495 100644 --- a/examples/compiled/selection_resolution_intersect.vg.json +++ b/examples/compiled/selection_resolution_intersect.vg.json @@ -356,7 +356,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"intersect\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"intersect\")", "scale": "color", "field": "Origin" }, @@ -720,7 +720,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"intersect\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"intersect\")", "scale": "color", "field": "Origin" }, @@ -1019,7 +1019,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"intersect\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"intersect\")", "scale": "color", "field": "Origin" }, @@ -1382,7 +1382,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"intersect\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"intersect\")", "scale": "color", "field": "Origin" }, @@ -1683,7 +1683,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"intersect\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"intersect\")", "scale": "color", "field": "Origin" }, @@ -2044,7 +2044,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"intersect\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"intersect\")", "scale": "color", "field": "Origin" }, @@ -2347,7 +2347,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"intersect\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"intersect\")", "scale": "color", "field": "Origin" }, @@ -2710,7 +2710,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"intersect\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"intersect\")", "scale": "color", "field": "Origin" }, @@ -3076,7 +3076,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"intersect\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"intersect\")", "scale": "color", "field": "Origin" }, diff --git a/examples/compiled/selection_resolution_union.vg.json b/examples/compiled/selection_resolution_union.vg.json index 7c7e1e152f..4e64c836da 100644 --- a/examples/compiled/selection_resolution_union.vg.json +++ b/examples/compiled/selection_resolution_union.vg.json @@ -356,7 +356,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -720,7 +720,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -1019,7 +1019,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -1382,7 +1382,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -1683,7 +1683,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -2044,7 +2044,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -2347,7 +2347,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -2710,7 +2710,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, @@ -3076,7 +3076,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"union\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"union\")", "scale": "color", "field": "Origin" }, diff --git a/examples/compiled/selection_toggle_altKey.vg.json b/examples/compiled/selection_toggle_altKey.vg.json index 4d8f3d0b1c..362b0a21d9 100644 --- a/examples/compiled/selection_toggle_altKey.vg.json +++ b/examples/compiled/selection_toggle_altKey.vg.json @@ -80,7 +80,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"paintbrush_store\"))) || (vlSelectionTest(\"paintbrush_store\", datum))", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json index 37b1550f52..580346ab5f 100644 --- a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json @@ -80,7 +80,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"paintbrush_store\"))) || (vlSelectionTest(\"paintbrush_store\", datum))", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_toggle_shiftKey.vg.json b/examples/compiled/selection_toggle_shiftKey.vg.json index 53055ea9b8..74e6934c78 100644 --- a/examples/compiled/selection_toggle_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_shiftKey.vg.json @@ -80,7 +80,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"paintbrush_store\"))) || (vlSelectionTest(\"paintbrush_store\", datum))", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json index 4fefb62dbe..cf1c0b06a1 100644 --- a/examples/compiled/selection_translate_brush_drag.vg.json +++ b/examples/compiled/selection_translate_brush_drag.vg.json @@ -305,7 +305,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json index 7d444eb51b..5fb8290cbf 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.vg.json +++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json @@ -311,7 +311,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, diff --git a/examples/compiled/selection_type_interval.vg.json b/examples/compiled/selection_type_interval.vg.json index 6b8e1ecc7f..b8b69a7333 100644 --- a/examples/compiled/selection_type_interval.vg.json +++ b/examples/compiled/selection_type_interval.vg.json @@ -298,7 +298,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_type_interval_invert.png b/examples/compiled/selection_type_interval_invert.png index 237e89d763af9c94367aa23d865adc20ecd431b2..408bd0cf3b9018751aa3fa8bda22742c2ebd6d75 100644 GIT binary patch literal 6999 zcmX|G2Q-y`+!x78$|{uXEql)>Gui9fBr9ZOlVp$VZ2ne}BzupLoxS%in``g)d*An* z_vGZc?mds+^BtchMCGL{J}x;f8X6kDyxcQ2G_)IZaBYfx3;sWi{J{+0ZkZ~|K0~`k z{rj)}Yb+WX#cla#Pc__9w`Sb+H8iiA_WC$m2>tI?QPG65p?@)E`H*F@`0-03pUZde`5Sh8o9D#Uj|B4qGaXnlOe6 z`(5C=71l0qYkT|94+D|H_~Z3-w!(PKC_$;h5hO37!Onqp>Se*ojWVktnGJK?ny*h8 za@4=RT-ezusz)zRjanDBWsH=#zEHO@&mXZSC=Uru*ldOGkVWuHAtuN?VEQ!|C{lq9QoLeuC6T20}zgG5KFnQDk)Vy-NGJ9|slq+|)RSWB&%Sb<3?ul#+R=d3lL3Fffib zC!`e=6bk8b2*gi(r>FI4XlTBrM!^v}dwQ17cN*JgX6mQkS@a}6H8i9&@;Rk{`t+%O zjWdp-VmHfHB}-^%=r^y_NZQFLe-B!E`T#hU$*Whb4c_M`Crgn@0``>h^76M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k>eAQTi7nE8u~q0R=?PJxhrI&J;p)~~Q>YYxPlC^fs4$Z6C* zIa$N#cTdXQoR0Rndgrb0Sxv zc@TZi0UhLi>%U6r!D-V07cl@*18dnbXiI$#If+*ei+jQV|Ia`CNqGrOG&p|stNBFh z@nT9y3>Y3giqJ9g(K6iK-i`w}>&s;n_ zrhv)&s#g*c66WUS(b3V3uqiGBJ8nAmO10uVv4`*`u \ No newline at end of file +3108Count of Records34568CylindersEuropeJapanUSAOrigin \ No newline at end of file diff --git a/examples/compiled/selection_type_interval_invert.vg.json b/examples/compiled/selection_type_interval_invert.vg.json index 91d2226703..8233581046 100644 --- a/examples/compiled/selection_type_interval_invert.vg.json +++ b/examples/compiled/selection_type_interval_invert.vg.json @@ -298,7 +298,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (!(vlSelectionTest(\"pts_store\", datum)))", + "test": "!(!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum))", "value": "grey" }, {"scale": "color", "field": "__count"} diff --git a/examples/compiled/selection_type_multi.vg.json b/examples/compiled/selection_type_multi.vg.json index 474b207a90..b708485bfc 100644 --- a/examples/compiled/selection_type_multi.vg.json +++ b/examples/compiled/selection_type_multi.vg.json @@ -85,7 +85,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_type_single.vg.json b/examples/compiled/selection_type_single.vg.json index 474b207a90..b708485bfc 100644 --- a/examples/compiled/selection_type_single.vg.json +++ b/examples/compiled/selection_type_single.vg.json @@ -85,7 +85,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_type_single_dblclick.vg.json b/examples/compiled/selection_type_single_dblclick.vg.json index 20783be444..3af3267c2f 100644 --- a/examples/compiled/selection_type_single_dblclick.vg.json +++ b/examples/compiled/selection_type_single_dblclick.vg.json @@ -85,7 +85,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_type_single_mouseover.vg.json b/examples/compiled/selection_type_single_mouseover.vg.json index 4f2ac8e435..074bf81eac 100644 --- a/examples/compiled/selection_type_single_mouseover.vg.json +++ b/examples/compiled/selection_type_single_mouseover.vg.json @@ -85,7 +85,7 @@ "update": { "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json index de85a398ad..bb15ab02fe 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json @@ -307,7 +307,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json index 4fefb62dbe..cf1c0b06a1 100644 --- a/examples/compiled/selection_zoom_brush_wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_wheel.vg.json @@ -305,7 +305,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", "scale": "color", "field": "Origin" }, diff --git a/examples/compiled/trellis_selections.vg.json b/examples/compiled/trellis_selections.vg.json index 085a2effff..c3150da132 100644 --- a/examples/compiled/trellis_selections.vg.json +++ b/examples/compiled/trellis_selections.vg.json @@ -485,7 +485,7 @@ "opacity": {"value": 1}, "fill": [ { - "test": "!(length(data(\"xenc_store\"))) || (vlSelectionTest(\"xenc_store\", datum))", + "test": "!length(data(\"xenc_store\")) || vlSelectionTest(\"xenc_store\", datum)", "value": "red" }, {"value": "steelblue"} @@ -510,7 +510,7 @@ ], "size": [ { - "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum, \"intersect\"))", + "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum, \"intersect\")", "value": 250 }, {"value": 100} diff --git a/examples/compiled/vconcat_flatten.vg.json b/examples/compiled/vconcat_flatten.vg.json index 1a2b6c4dfa..550666178a 100644 --- a/examples/compiled/vconcat_flatten.vg.json +++ b/examples/compiled/vconcat_flatten.vg.json @@ -69,7 +69,7 @@ "transform": [ { "type": "filter", - "expr": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))" + "expr": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)" } ] } @@ -153,7 +153,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", "value": "steelblue" }, {"value": "grey"} diff --git a/examples/specs/airport_connections.vl.json b/examples/specs/airport_connections.vl.json index c746c66850..acda8c3217 100644 --- a/examples/specs/airport_connections.vl.json +++ b/examples/specs/airport_connections.vl.json @@ -18,7 +18,7 @@ "mark": {"type": "rule", "color": "#000", "opacity": 0.35}, "data": {"url": "data/flights-airport.csv"}, "transform": [ - {"filter": {"selection": "org"}}, + {"filter": {"selection": "org", "empty": false}}, { "lookup": "origin", "from": { @@ -65,8 +65,7 @@ "type": "point", "on": "mouseover", "nearest": true, - "fields": ["origin"], - "empty": "none" + "fields": ["origin"] } }], "encoding": { diff --git a/examples/specs/concat_hover.vl.json b/examples/specs/concat_hover.vl.json index da048a1f7a..01dad7c0c3 100644 --- a/examples/specs/concat_hover.vl.json +++ b/examples/specs/concat_hover.vl.json @@ -5,36 +5,34 @@ "hconcat": [{ "params": [{ "name": "hover", - "select": { - "type": "point", - "on": "mouseover", - "empty": "none" - } + "select": {"type": "point", "on": "mouseover"} }], "mark": "point", "encoding": { "x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Miles_per_Gallon", "type": "quantitative"}, "color": { - "condition": {"selection": "hover", "field": "Cylinders", "type": "ordinal"}, + "condition": { + "selection": "hover", "empty": false, + "field": "Cylinders", "type": "ordinal" + }, "value": "grey" } } },{ "params": [{ "name": "hover", - "select": { - "type": "point", - "on": "mouseover", - "empty": "none" - } + "select": {"type": "point", "on": "mouseover"} }], "mark": "point", "encoding": { "x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Acceleration", "type": "quantitative"}, "color": { - "condition": {"selection": "hover", "field": "Cylinders", "type": "ordinal"}, + "condition": { + "selection": "hover", "empty": false, + "field": "Cylinders", "type": "ordinal" + }, "value": "grey" } } diff --git a/examples/specs/concat_hover_filter.vl.json b/examples/specs/concat_hover_filter.vl.json index 9a1f477a3e..35ebd6a6fe 100644 --- a/examples/specs/concat_hover_filter.vl.json +++ b/examples/specs/concat_hover_filter.vl.json @@ -11,17 +11,15 @@ { "params": [{ "name": "hover", - "select": { - "type": "point", - "on": "mouseover", - "empty": "none" - } + "select": {"type": "point", "on": "mouseover"} }], "mark": "point" }, { "mark": {"type": "point", "color": "goldenrod"}, - "transform": [{"filter": {"selection": "hover"}}] + "transform": [ + {"filter": {"selection": "hover", "empty": false}} + ] } ] }, { @@ -34,17 +32,15 @@ "params": [{ "name": "hover", - "select": { - "type": "point", - "on": "mouseover", - "empty": "none" - } + "select": {"type": "point", "on": "mouseover"} }], "mark": "point" }, { "mark": {"type": "point", "color": "goldenrod"}, - "transform": [{"filter": {"selection": "hover"}}] + "transform": [ + {"filter": {"selection": "hover", "empty": false}} + ] } ] }] diff --git a/examples/specs/interactive_bar_select_highlight.vl.json b/examples/specs/interactive_bar_select_highlight.vl.json index e11059b288..203fc7a94c 100644 --- a/examples/specs/interactive_bar_select_highlight.vl.json +++ b/examples/specs/interactive_bar_select_highlight.vl.json @@ -11,16 +11,9 @@ "params": [ { "name": "highlight", - "select": { - "type": "point", - "empty": "none", - "on": "mouseover" - } + "select": {"type": "point", "on": "mouseover"} }, - { - "name": "select", - "select": {"type": "point"} - } + {"name": "select", "select": "point"} ], "mark": { "type": "bar", @@ -38,15 +31,15 @@ "strokeWidth": { "condition": [ { - "test": { - "and": [ - {"selection": "select"}, - "length(data(\"select_store\"))" - ] - }, + "selection": "select", + "empty": false, "value": 2 }, - {"selection": "highlight", "value": 1} + { + "selection": "highlight", + "empty": false, + "value": 1 + } ], "value": 0 } diff --git a/examples/specs/interactive_dashboard_europe_pop.vl.json b/examples/specs/interactive_dashboard_europe_pop.vl.json index 7ac4e71b24..e5da019b4c 100644 --- a/examples/specs/interactive_dashboard_europe_pop.vl.json +++ b/examples/specs/interactive_dashboard_europe_pop.vl.json @@ -323,8 +323,12 @@ "type": "quantitative" }, "color": { - "condition": {"selection": {"not": "brush"}, "value": "steelblue"}, - "value": "goldenrod" + "condition": { + "selection": "brush", + "empty": false, + "value": "goldenrod" + }, + "value": "steelblue" } } }, @@ -346,8 +350,12 @@ "type": "quantitative" }, "color": { - "condition": {"selection": {"not": "brush"}, "value": "steelblue"}, - "value": "goldenrod" + "condition": { + "selection": "brush", + "empty": false, + "value": "goldenrod" + }, + "value": "steelblue" } } }, @@ -368,8 +376,12 @@ "scale": {"zero": false} }, "color": { - "condition": {"selection": {"not": "brush"}, "value": "steelblue"}, - "value": "goldenrod" + "condition": { + "selection": "brush", + "empty": false, + "value": "goldenrod" + }, + "value": "steelblue" } } } diff --git a/examples/specs/interactive_global_development.vl.json b/examples/specs/interactive_global_development.vl.json index 2075bcfc5b..e6c38b92f9 100644 --- a/examples/specs/interactive_global_development.vl.json +++ b/examples/specs/interactive_global_development.vl.json @@ -66,9 +66,10 @@ "order": {"field": "year"}, "opacity": { "condition": { - "test": { - "or": [{"selection": "hovered"}, {"selection": "clicked"}] - }, + "test": {"or": [ + {"selection": "hovered", "empty": false}, + {"selection": "clicked", "empty": false} + ]}, "value": 0.8 }, "value": 0 @@ -95,17 +96,13 @@ "select": { "type": "point", "fields": ["country"], - "on": "mouseover", - "empty": "none" + "toggle": false, + "on": "mouseover" } }, { "name": "clicked", - "select": { - "type": "point", - "fields": ["country"], - "empty": "none" - } + "select": {"type": "point", "fields": ["country"]} } ], "transform": [{"filter": {"selection": "year"}}], @@ -118,7 +115,10 @@ "filter": { "and": [ {"selection": "year"}, - {"or": [{"selection": "clicked"}, {"selection": "hovered"}]} + {"or": [ + {"selection": "clicked", "empty": false}, + {"selection": "hovered", "empty": false} + ]} ] } } @@ -136,7 +136,7 @@ }, { "transform": [ - {"filter": {"selection": "hovered"}}, + {"filter": {"selection": "hovered", "empty": false}}, {"filter": {"not": {"selection": "year"}}} ], "layer": [ diff --git a/examples/specs/interactive_line_hover.vl.json b/examples/specs/interactive_line_hover.vl.json index 4bc36c3c22..e1d698e351 100644 --- a/examples/specs/interactive_line_hover.vl.json +++ b/examples/specs/interactive_line_hover.vl.json @@ -31,8 +31,7 @@ "select": { "type": "point", "fields": ["symbol"], - "on": "mouseover", - "empty": "all" + "on": "mouseover" } }], "mark": {"type": "line", "strokeWidth": 8, "stroke": "transparent"} diff --git a/examples/specs/interactive_multi_line_label.vl.json b/examples/specs/interactive_multi_line_label.vl.json index 7128e82f5e..0cfddcd7f3 100644 --- a/examples/specs/interactive_multi_line_label.vl.json +++ b/examples/specs/interactive_multi_line_label.vl.json @@ -21,14 +21,17 @@ "type": "point", "encodings": ["x"], "nearest": true, - "on": "mouseover", - "empty": "none" + "on": "mouseover" } }], "mark": "point", "encoding": { "opacity": { - "condition": {"selection": "label", "value": 1}, + "condition": { + "selection": "label", + "empty": false, + "value": 1 + }, "value": 0 } } @@ -36,7 +39,7 @@ ] }, { - "transform": [{"filter": {"selection": "label"}}], + "transform": [{"filter": {"selection": "label", "empty": false}}], "layer": [ { "mark": {"type": "rule", "color": "gray"}, diff --git a/examples/specs/interactive_multi_line_pivot_tooltip.vl.json b/examples/specs/interactive_multi_line_pivot_tooltip.vl.json index 65ca6fb5b0..1d8ed57496 100644 --- a/examples/specs/interactive_multi_line_pivot_tooltip.vl.json +++ b/examples/specs/interactive_multi_line_pivot_tooltip.vl.json @@ -12,7 +12,7 @@ }, "layer": [ {"mark": "line"}, - {"transform": [{"filter": {"selection": "hover"}}], "mark": "point"} + {"transform": [{"filter": {"selection": "hover", "empty": false}}], "mark": "point"} ] }, { @@ -20,7 +20,7 @@ "mark": "rule", "encoding": { "opacity": { - "condition": {"value": 0.3, "selection": "hover"}, + "condition": {"value": 0.3, "selection": "hover", "empty": false}, "value": 0 }, "tooltip": [ @@ -38,7 +38,6 @@ "fields": ["date"], "nearest": true, "on": "mouseover", - "empty": "none", "clear": "mouseout" } }] diff --git a/examples/specs/interactive_multi_line_tooltip.vl.json b/examples/specs/interactive_multi_line_tooltip.vl.json index 812506b9cc..314d831c9b 100644 --- a/examples/specs/interactive_multi_line_tooltip.vl.json +++ b/examples/specs/interactive_multi_line_tooltip.vl.json @@ -23,13 +23,16 @@ "mark": "rule", "params": [{ "name": "hover", - "select": {"type": "point", "on": "mouseover", "empty": "none"} + "select": {"type": "point", "on": "mouseover"} }], "encoding": { "color": { - "condition":{ - "selection": {"not": "hover"}, "value": "transparent" - } + "condition": { + "selection": "hover", + "empty": false, + "value": "black" + }, + "value": "transparent" } } }], diff --git a/examples/specs/interactive_paintbrush_simple_all.vl.json b/examples/specs/interactive_paintbrush_simple_all.vl.json index 8bbfa51326..863e8b1996 100644 --- a/examples/specs/interactive_paintbrush_simple_all.vl.json +++ b/examples/specs/interactive_paintbrush_simple_all.vl.json @@ -3,7 +3,7 @@ "data": {"url": "data/cars.json"}, "params": [{ "name": "paintbrush", - "select": {"type": "point", "on": "mouseover", "empty": "all"} + "select": {"type": "point", "on": "mouseover"} }], "mark": "point", "encoding": { @@ -11,7 +11,9 @@ "y": {"field": "Miles_per_Gallon", "type": "quantitative"}, "size": { "condition": { - "selection": "paintbrush", "value": 300 + "selection": "paintbrush", + "empty": true, + "value": 300 }, "value": 50 } diff --git a/examples/specs/interactive_paintbrush_simple_none.vl.json b/examples/specs/interactive_paintbrush_simple_none.vl.json index 81844d186c..4058d8d625 100644 --- a/examples/specs/interactive_paintbrush_simple_none.vl.json +++ b/examples/specs/interactive_paintbrush_simple_none.vl.json @@ -3,7 +3,7 @@ "data": {"url": "data/cars.json"}, "params": [{ "name": "paintbrush", - "select": {"type": "point", "on": "mouseover", "empty": "none"} + "select": {"type": "point", "on": "mouseover"} }], "mark": "point", "encoding": { @@ -11,7 +11,9 @@ "y": {"field": "Miles_per_Gallon", "type": "quantitative"}, "size": { "condition": { - "selection": "paintbrush", "value": 300 + "selection": "paintbrush", + "empty": false, + "value": 300 }, "value": 50 } diff --git a/examples/specs/normalized/airport_connections_normalized.vl.json b/examples/specs/normalized/airport_connections_normalized.vl.json index 27b5a51b41..735cd34c2c 100644 --- a/examples/specs/normalized/airport_connections_normalized.vl.json +++ b/examples/specs/normalized/airport_connections_normalized.vl.json @@ -19,7 +19,7 @@ "mark": {"type": "rule", "color": "#000", "opacity": 0.35}, "data": {"url": "data/flights-airport.csv"}, "transform": [ - {"filter": {"selection": "org"}}, + {"filter": {"selection": "org", "empty": false}}, { "lookup": "origin", "from": { @@ -68,8 +68,7 @@ "type": "point", "on": "mouseover", "nearest": true, - "fields": ["origin"], - "empty": "none" + "fields": ["origin"] } } ], diff --git a/examples/specs/normalized/concat_hover_filter_normalized.vl.json b/examples/specs/normalized/concat_hover_filter_normalized.vl.json index 31de068baa..743efe2070 100644 --- a/examples/specs/normalized/concat_hover_filter_normalized.vl.json +++ b/examples/specs/normalized/concat_hover_filter_normalized.vl.json @@ -7,10 +7,7 @@ "layer": [ { "params": [ - { - "name": "hover", - "select": {"type": "point", "on": "mouseover", "empty": "none"} - } + {"name": "hover", "select": {"type": "point", "on": "mouseover"}} ], "mark": "point", "encoding": { @@ -20,7 +17,7 @@ }, { "mark": {"type": "point", "color": "goldenrod"}, - "transform": [{"filter": {"selection": "hover"}}], + "transform": [{"filter": {"selection": "hover", "empty": false}}], "encoding": { "x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Miles_per_Gallon", "type": "quantitative"} @@ -32,10 +29,7 @@ "layer": [ { "params": [ - { - "name": "hover", - "select": {"type": "point", "on": "mouseover", "empty": "none"} - } + {"name": "hover", "select": {"type": "point", "on": "mouseover"}} ], "mark": "point", "encoding": { @@ -45,7 +39,7 @@ }, { "mark": {"type": "point", "color": "goldenrod"}, - "transform": [{"filter": {"selection": "hover"}}], + "transform": [{"filter": {"selection": "hover", "empty": false}}], "encoding": { "x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Acceleration", "type": "quantitative"} diff --git a/examples/specs/normalized/interactive_global_development_normalized.vl.json b/examples/specs/normalized/interactive_global_development_normalized.vl.json index a53ce92ce2..ab0903f7af 100644 --- a/examples/specs/normalized/interactive_global_development_normalized.vl.json +++ b/examples/specs/normalized/interactive_global_development_normalized.vl.json @@ -65,7 +65,10 @@ "opacity": { "condition": { "test": { - "or": [{"selection": "hovered"}, {"selection": "clicked"}] + "or": [ + {"selection": "hovered", "empty": false}, + {"selection": "clicked", "empty": false} + ] }, "value": 0.8 }, @@ -92,17 +95,13 @@ "select": { "type": "point", "fields": ["country"], - "on": "mouseover", - "empty": "none" + "toggle": false, + "on": "mouseover" } }, { "name": "clicked", - "select": { - "type": "point", - "fields": ["country"], - "empty": "none" - } + "select": {"type": "point", "fields": ["country"]} } ], "transform": [{"filter": {"selection": "year"}}], @@ -129,7 +128,12 @@ "filter": { "and": [ {"selection": "year"}, - {"or": [{"selection": "clicked"}, {"selection": "hovered"}]} + { + "or": [ + {"selection": "clicked", "empty": false}, + {"selection": "hovered", "empty": false} + ] + } ] } } @@ -159,7 +163,7 @@ }, { "transform": [ - {"filter": {"selection": "hovered"}}, + {"filter": {"selection": "hovered", "empty": false}}, {"filter": {"not": {"selection": "year"}}} ], "layer": [ diff --git a/examples/specs/normalized/interactive_line_hover_normalized.vl.json b/examples/specs/normalized/interactive_line_hover_normalized.vl.json index 7b7f0ed7b7..96ac2235fa 100644 --- a/examples/specs/normalized/interactive_line_hover_normalized.vl.json +++ b/examples/specs/normalized/interactive_line_hover_normalized.vl.json @@ -10,12 +10,7 @@ { "name": "hover", "value": [{"symbol": "AAPL"}], - "select": { - "type": "point", - "fields": ["symbol"], - "on": "mouseover", - "empty": "all" - } + "select": {"type": "point", "fields": ["symbol"], "on": "mouseover"} } ], "mark": {"type": "line", "strokeWidth": 8, "stroke": "transparent"}, diff --git a/examples/specs/normalized/interactive_multi_line_label_normalized.vl.json b/examples/specs/normalized/interactive_multi_line_label_normalized.vl.json index 9f059e5ada..17d8a6b311 100644 --- a/examples/specs/normalized/interactive_multi_line_label_normalized.vl.json +++ b/examples/specs/normalized/interactive_multi_line_label_normalized.vl.json @@ -22,8 +22,7 @@ "type": "point", "encodings": ["x"], "nearest": true, - "on": "mouseover", - "empty": "none" + "on": "mouseover" } } ], @@ -33,7 +32,7 @@ "y": {"field": "price", "type": "quantitative"}, "color": {"field": "symbol", "type": "nominal"}, "opacity": { - "condition": {"selection": "label", "value": 1}, + "condition": {"selection": "label", "empty": false, "value": 1}, "value": 0 } } @@ -41,7 +40,7 @@ ] }, { - "transform": [{"filter": {"selection": "label"}}], + "transform": [{"filter": {"selection": "label", "empty": false}}], "layer": [ { "mark": {"type": "rule", "color": "gray"}, diff --git a/examples/specs/normalized/interactive_multi_line_pivot_tooltip_normalized.vl.json b/examples/specs/normalized/interactive_multi_line_pivot_tooltip_normalized.vl.json index 6cbd54cb7e..aafb639051 100644 --- a/examples/specs/normalized/interactive_multi_line_pivot_tooltip_normalized.vl.json +++ b/examples/specs/normalized/interactive_multi_line_pivot_tooltip_normalized.vl.json @@ -15,7 +15,7 @@ } }, { - "transform": [{"filter": {"selection": "hover"}}], + "transform": [{"filter": {"selection": "hover", "empty": false}}], "mark": "point", "encoding": { "x": {"field": "date", "type": "temporal"}, @@ -31,7 +31,7 @@ "encoding": { "x": {"field": "date", "type": "temporal"}, "opacity": { - "condition": {"value": 0.3, "selection": "hover"}, + "condition": {"value": 0.3, "selection": "hover", "empty": false}, "value": 0 }, "tooltip": [ @@ -50,7 +50,6 @@ "fields": ["date"], "nearest": true, "on": "mouseover", - "empty": "none", "clear": "mouseout" } } diff --git a/examples/specs/normalized/interactive_multi_line_tooltip_normalized.vl.json b/examples/specs/normalized/interactive_multi_line_tooltip_normalized.vl.json index ca66d378ad..a7b5df69ce 100644 --- a/examples/specs/normalized/interactive_multi_line_tooltip_normalized.vl.json +++ b/examples/specs/normalized/interactive_multi_line_tooltip_normalized.vl.json @@ -29,10 +29,7 @@ { "mark": "rule", "params": [ - { - "name": "hover", - "select": {"type": "point", "on": "mouseover", "empty": "none"} - } + {"name": "hover", "select": {"type": "point", "on": "mouseover"}} ], "encoding": { "x": {"timeUnit": "yearmonthdate", "field": "date"}, @@ -42,7 +39,8 @@ {"field": "temp_min", "type": "quantitative"} ], "color": { - "condition": {"selection": {"not": "hover"}, "value": "transparent"} + "condition": {"selection": "hover", "empty": false, "value": "black"}, + "value": "transparent" } } } diff --git a/examples/specs/selection_composition_and.vl.json b/examples/specs/selection_composition_and.vl.json index 769529973c..d28586ee3e 100644 --- a/examples/specs/selection_composition_and.vl.json +++ b/examples/specs/selection_composition_and.vl.json @@ -26,7 +26,10 @@ "x": {"field": "Cylinders", "type": "ordinal"}, "color": { "condition": { - "selection": {"and": ["alex", "morgan"]}, + "test": {"and": [ + {"selection": "alex"}, + {"selection": "morgan"} + ]}, "aggregate": "count" }, "value": "grey" diff --git a/examples/specs/selection_composition_or.vl.json b/examples/specs/selection_composition_or.vl.json index cd7fec5e2b..4e3dc28f89 100644 --- a/examples/specs/selection_composition_or.vl.json +++ b/examples/specs/selection_composition_or.vl.json @@ -26,7 +26,10 @@ "x": {"field": "Cylinders", "type": "ordinal"}, "color": { "condition": { - "selection": {"or": ["alex", "morgan"]}, + "test": {"or": [ + {"selection": "alex"}, + {"selection": "morgan"} + ]}, "aggregate": "count" }, "value": "grey" diff --git a/examples/specs/selection_heatmap.vl.json b/examples/specs/selection_heatmap.vl.json index 6e6889bcea..cdfbf69017 100644 --- a/examples/specs/selection_heatmap.vl.json +++ b/examples/specs/selection_heatmap.vl.json @@ -29,7 +29,11 @@ "type": "quantitative" }, "stroke": { - "condition": {"test": {"and": [{"selection": "highlight"}, "length(data(\"highlight_store\"))"]}, "value": "black"}, + "condition": { + "selection": "highlight", + "empty": false, + "value": "black" + }, "value": null }, "opacity": { diff --git a/examples/specs/selection_type_interval_invert.vl.json b/examples/specs/selection_type_interval_invert.vl.json index bb11745487..3c0f97ec24 100644 --- a/examples/specs/selection_type_interval_invert.vl.json +++ b/examples/specs/selection_type_interval_invert.vl.json @@ -8,7 +8,7 @@ "x": {"field": "Cylinders"}, "color": { "condition": { - "selection": {"not": "pts"}, + "test": {"not": {"selection": "pts"}}, "value": "grey" }, "aggregate": "count" diff --git a/examples/specs/vconcat_flatten.vl.json b/examples/specs/vconcat_flatten.vl.json index 12eb09c2be..32845d37b6 100644 --- a/examples/specs/vconcat_flatten.vl.json +++ b/examples/specs/vconcat_flatten.vl.json @@ -32,7 +32,7 @@ "mark": "circle", "params": [{ "name": "pts", - "select": {"type": "point", "fields": ["id"], "empty": "all"} + "select": {"type": "point", "fields": ["id"]} }], "encoding": { "x": {"field": "ra", "type": "quantitative", "scale": {"zero": false}}, diff --git a/site/docs/encoding/condition.md b/site/docs/encoding/condition.md index d668308b8d..59f1cd8fa8 100644 --- a/site/docs/encoding/condition.md +++ b/site/docs/encoding/condition.md @@ -127,7 +127,7 @@ For example, in the visualization below, a conditional value definition causes m
-A field mapping can also be specified as the else (outer) branch. For example, below, we invert our original example: a conditional value definition sets the `rect` marks to grey when they do _not_ lie within the selection, and a regular field mapping is used otherwise. Notice, all marks are initially colored grey. This is because empty selections are treated as containing all data values. +A field mapping can also be specified as the else (outer) branch. For example, below, we invert our original example: a conditional value definition sets the `rect` marks to grey when they do _not_ lie within the selection, and a regular field mapping is used otherwise. Notice, no marks are initially colored grey. This is because empty selections are treated as containing all data values.
diff --git a/src/channeldef.ts b/src/channeldef.ts index e8b7ee15d7..7b28f68e1c 100644 --- a/src/channeldef.ts +++ b/src/channeldef.ts @@ -57,7 +57,7 @@ import {Legend} from './legend'; import * as log from './log'; import {LogicalComposition} from './logical'; import {isRectBasedMark, Mark, MarkDef} from './mark'; -import {Predicate} from './predicate'; +import {Predicate, SelectionPredicate} from './predicate'; import {Scale, SCALE_CATEGORY_INDEX} from './scale'; import {isSortByChannel, Sort, SortOrder} from './sort'; import {isFacetFieldDef} from './spec/facet'; @@ -146,12 +146,9 @@ export type ConditionalPredicate | DatumDef | ValueDef< test: LogicalComposition; } & CD; -export type ConditionalSelection | DatumDef | ValueDef | ExprRef | SignalRef> = { - /** - * A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose). - */ - selection: LogicalComposition; -} & CD; +export type ConditionalSelection< + CD extends FieldDef | DatumDef | ValueDef | ExprRef | SignalRef +> = SelectionPredicate & CD; export function isConditionalSelection(c: Conditional): c is ConditionalSelection { return c['selection']; diff --git a/src/compile/mark/encode/conditional.ts b/src/compile/mark/encode/conditional.ts index aba8fc42cd..660875af18 100644 --- a/src/compile/mark/encode/conditional.ts +++ b/src/compile/mark/encode/conditional.ts @@ -1,11 +1,5 @@ import {array} from 'vega-util'; -import { - ChannelDef, - ConditionalPredicate, - ConditionalSelection, - isConditionalDef, - isConditionalSelection -} from '../../../channeldef'; +import {ChannelDef, ConditionalPredicate, isConditionalDef, isConditionalSelection} from '../../../channeldef'; import {GuideEncodingConditionalValueDef} from '../../../guide'; import {VgEncodeEntry, VgValueRef} from '../../../vega.schema'; import {expression} from '../../predicate'; @@ -28,13 +22,14 @@ export function wrapCondition { const conditionValueRef = refFn(c); - const test = isConditionalSelection(c) - ? parseSelectionPredicate(model, (c as ConditionalSelection).selection) // FIXME: remove casting once TS is no longer dumb about it - : expression(model, (c as ConditionalPredicate).test); // FIXME: remove casting once TS is no longer dumb about it - return { - test, - ...conditionValueRef - }; + if (isConditionalSelection(c)) { + const {selection, empty} = c; + const test = parseSelectionPredicate(model, {selection, empty}); + return {test, ...conditionValueRef}; + } else { + const test = expression(model, (c as ConditionalPredicate).test); // FIXME: remove casting once TS is no longer dumb about it + return {test, ...conditionValueRef}; + } }); return { [vgChannel]: [...vgConditions, ...(valueRef !== undefined ? [valueRef] : [])] diff --git a/src/compile/predicate.ts b/src/compile/predicate.ts index cd84a269ea..75335af3bd 100644 --- a/src/compile/predicate.ts +++ b/src/compile/predicate.ts @@ -15,7 +15,7 @@ export function expression(model: Model, filterOp: LogicalComposition if (isString(predicate)) { return predicate; } else if (isSelectionPredicate(predicate)) { - return parseSelectionPredicate(model, predicate.selection, node); + return parseSelectionPredicate(model, predicate, node); } else { // Filter Object return fieldFilterExpression(predicate); diff --git a/src/compile/selection/index.ts b/src/compile/selection/index.ts index 68c023d902..84944eaae5 100644 --- a/src/compile/selection/index.ts +++ b/src/compile/selection/index.ts @@ -44,7 +44,6 @@ export interface SelectionComponent { materialized: OutputNode; bind?: 'scales' | Binding | Dict | LegendBinding; resolve: SelectionResolution; - empty: 'all' | 'none'; mark?: BrushConfig; // Transforms diff --git a/src/compile/selection/parse.ts b/src/compile/selection/parse.ts index a7f4f29ed6..db5f44df65 100644 --- a/src/compile/selection/parse.ts +++ b/src/compile/selection/parse.ts @@ -2,14 +2,14 @@ import {selector as parseSelector} from 'vega-event-selector'; import {array, isObject, isString, stringValue} from 'vega-util'; import {selectionCompilers, SelectionComponent, STORE} from '.'; import {warn} from '../../log'; -import {LogicalComposition} from '../../logical'; import {BaseSelectionConfig, SelectionDef, SelectionExtent} from '../../selection'; -import {Dict, duplicate, entries, logicalExpr, replacePathInField, varName} from '../../util'; +import {Dict, duplicate, entries, replacePathInField, varName} from '../../util'; import {DataFlowNode, OutputNode} from '../data/dataflow'; import {FilterNode} from '../data/filter'; import {Model} from '../model'; import {UnitModel} from '../unit'; import {DataSourceType} from '../../data'; +import {SelectionPredicate} from '../../predicate'; export function parseUnitSelection(model: UnitModel, selDefs: SelectionDef[]) { const selCmpts: Dict> = {}; @@ -59,39 +59,30 @@ export function parseUnitSelection(model: UnitModel, selDefs: SelectionDef[]) { export function parseSelectionPredicate( model: Model, - selections: LogicalComposition, + pred: SelectionPredicate, dfnode?: DataFlowNode, datum = 'datum' ): string { - const stores: string[] = []; - function expr(name: string): string { - const vname = varName(name); - const selCmpt = model.getSelectionComponent(vname, name); - const store = stringValue(vname + STORE); - - if (selCmpt.project.timeUnit) { - const child = dfnode ?? model.component.data.raw; - const tunode = selCmpt.project.timeUnit.clone(); - if (child.parent) { - tunode.insertAsParentOf(child); - } else { - child.parent = tunode; - } - } - - if (selCmpt.empty !== 'none') { - stores.push(store); + const name = isString(pred) ? pred : pred.selection; + const vname = varName(name); + const selCmpt = model.getSelectionComponent(vname, name); + const store = stringValue(vname + STORE); + + if (selCmpt.project.timeUnit) { + const child = dfnode ?? model.component.data.raw; + const tunode = selCmpt.project.timeUnit.clone(); + if (child.parent) { + tunode.insertAsParentOf(child); + } else { + child.parent = tunode; } - - return ( - `vlSelectionTest(${store}, ${datum}` + (selCmpt.resolve === 'global' ? ')' : `, ${stringValue(selCmpt.resolve)})`) - ); } - const predicateStr = logicalExpr(selections, expr); - return ( - (stores.length ? '!(' + stores.map(s => `length(data(${s}))`).join(' || ') + ') || ' : '') + `(${predicateStr})` - ); + const test = + `vlSelectionTest(${store}, ${datum}` + (selCmpt.resolve === 'global' ? ')' : `, ${stringValue(selCmpt.resolve)})`); + const length = `length(data(${store}))`; + + return pred.empty === false ? `${length} && ${test}` : `!${length} || ${test}`; } export function parseSelectionExtent(selCmpt: SelectionComponent, extent: SelectionExtent) { diff --git a/src/predicate.ts b/src/predicate.ts index 7055d431b4..988805f791 100644 --- a/src/predicate.ts +++ b/src/predicate.ts @@ -35,9 +35,14 @@ export type FieldPredicate = export interface SelectionPredicate { /** - * Filter using a selection name or a logical composition of selection names. + * Filter using a selection name. */ - selection: LogicalComposition; + selection: string; + /** + * By default, the predicate of empty selections returns true. + * Override this behavior, by setting this property `empty: false`. + */ + empty?: boolean; } export function isSelectionPredicate(predicate: LogicalComposition): predicate is SelectionPredicate { diff --git a/src/selection.ts b/src/selection.ts index a21376fe02..c508a54727 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -62,12 +62,6 @@ export interface BaseSelectionConfig { * __See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation. */ fields?: FieldName[]; - - /** - * By default, `all` data values are considered to lie within an empty selection. - * When set to `none`, empty selections contain no data values. - */ - empty?: 'all' | 'none'; } export interface PointSelectionConfig extends BaseSelectionConfig { @@ -277,7 +271,6 @@ export const defaultConfig: SelectionConfig = { fields: [SELECTION_ID], toggle: 'event.shiftKey', resolve: 'global', - empty: 'all', clear: 'dblclick' }, interval: { diff --git a/test/compile/selection/parse.test.ts b/test/compile/selection/parse.test.ts index 5e61ee6160..2faee16c04 100644 --- a/test/compile/selection/parse.test.ts +++ b/test/compile/selection/parse.test.ts @@ -347,7 +347,7 @@ describe('Selection', () => { transform: [ { type: 'filter', - expr: '!(length(data("index_store"))) || (vlSelectionTest("index_store", datum))' + expr: '!length(data("index_store")) || vlSelectionTest("index_store", datum)' } ] }, diff --git a/test/compile/selection/predicate.test.ts b/test/compile/selection/predicate.test.ts index ec8e1ccd4b..6189e288de 100644 --- a/test/compile/selection/predicate.test.ts +++ b/test/compile/selection/predicate.test.ts @@ -21,7 +21,8 @@ describe('Selection Predicate', () => { field: 'Acceleration', type: 'quantitative', condition: { - selection: {or: ['one', {and: ['two', {not: 'thr-ee'}]}]}, + selection: 'one', + empty: false, value: 0.5 } } @@ -33,50 +34,34 @@ describe('Selection Predicate', () => { model.component.selection = parseUnitSelection(model, [ {name: 'one', select: 'point'}, {name: 'two', select: {type: 'point', resolve: 'union'}}, - {name: 'thr-ee', select: {type: 'interval', resolve: 'intersect'}}, - {name: 'four', select: {type: 'point', empty: 'none'}} + {name: 'thr-ee', select: {type: 'interval', resolve: 'intersect'}} ]); it('generates the predicate expression', () => { - expect(predicate(model, 'one')).toBe('!(length(data("one_store"))) || (vlSelectionTest("one_store", datum))'); - - expect(predicate(model, 'four')).toBe('(vlSelectionTest("four_store", datum))'); - - expect(predicate(model, {not: 'one'})).toEqual( - '!(length(data("one_store"))) || (!(vlSelectionTest("one_store", datum)))' + // Different resolutions + expect(predicate(model, {selection: 'one'})).toBe( + '!length(data("one_store")) || vlSelectionTest("one_store", datum)' ); - - expect(predicate(model, {not: {and: ['one', 'two']}})).toEqual( - '!(length(data("one_store")) || length(data("two_store"))) || ' + - '(!((vlSelectionTest("one_store", datum)) && ' + - '(vlSelectionTest("two_store", datum, "union"))))' + expect(predicate(model, {selection: 'two'})).toBe( + '!length(data("two_store")) || vlSelectionTest("two_store", datum, "union")' ); - - expect(predicate(model, {not: {and: ['one', 'four']}})).toEqual( - '!(length(data("one_store"))) || ' + - '(!((vlSelectionTest("one_store", datum)) && ' + - '(vlSelectionTest("four_store", datum))))' + expect(predicate(model, {selection: 'thr-ee'})).toBe( + '!length(data("thr_ee_store")) || vlSelectionTest("thr_ee_store", datum, "intersect")' ); - expect(predicate(model, {and: ['one', 'two', {not: 'thr-ee'}]})).toEqual( - '!(length(data("one_store")) || length(data("two_store")) || length(data("thr_ee_store"))) || ' + - '((vlSelectionTest("one_store", datum)) && ' + - '(vlSelectionTest("two_store", datum, "union")) && ' + - '(!(vlSelectionTest("thr_ee_store", datum, "intersect"))))' + // Different emptiness + expect(predicate(model, {selection: 'one', empty: true})).toBe( + '!length(data("one_store")) || vlSelectionTest("one_store", datum)' ); - - expect(predicate(model, {or: ['one', {and: ['two', {not: 'thr-ee'}]}]})).toEqual( - '!(length(data("one_store")) || length(data("two_store")) || length(data("thr_ee_store"))) || ' + - '((vlSelectionTest("one_store", datum)) || ' + - '((vlSelectionTest("two_store", datum, "union")) && ' + - '(!(vlSelectionTest("thr_ee_store", datum, "intersect")))))' + expect(predicate(model, {selection: 'one', empty: false})).toBe( + 'length(data("one_store")) && vlSelectionTest("one_store", datum)' ); }); it('generates Vega production rules', () => { expect(nonPosition('color', model, {vgChannel: 'fill'})).toEqual({ fill: [ - {test: '!(length(data("one_store"))) || (vlSelectionTest("one_store", datum))', value: 'grey'}, + {test: '!length(data("one_store")) || vlSelectionTest("one_store", datum)', value: 'grey'}, {scale: 'color', field: 'Cylinders'} ] }); @@ -84,11 +69,7 @@ describe('Selection Predicate', () => { expect(nonPosition('opacity', model)).toEqual({ opacity: [ { - test: - '!(length(data("one_store")) || length(data("two_store")) || length(data("thr_ee_store"))) || ' + - '((vlSelectionTest("one_store", datum)) || ' + - '((vlSelectionTest("two_store", datum, "union")) && ' + - '(!(vlSelectionTest("thr_ee_store", datum, "intersect")))))', + test: 'length(data("one_store")) && vlSelectionTest("one_store", datum)', value: 0.5 }, {scale: 'opacity', field: 'Acceleration'} @@ -98,35 +79,15 @@ describe('Selection Predicate', () => { it('generates a selection filter', () => { expect(expression(model, {selection: 'one'})).toEqual( - '!(length(data("one_store"))) || (vlSelectionTest("one_store", datum))' - ); - - expect(expression(model, {selection: {not: 'one'}})).toEqual( - '!(length(data("one_store"))) || (!(vlSelectionTest("one_store", datum)))' - ); - - expect(expression(model, {selection: {not: {and: ['one', 'two']}}})).toEqual( - '!(length(data("one_store")) || length(data("two_store"))) || ' + - '(!((vlSelectionTest("one_store", datum)) && ' + - '(vlSelectionTest("two_store", datum, "union"))))' - ); - - expect(expression(model, {selection: {and: ['one', 'two', {not: 'thr-ee'}]}})).toEqual( - '!(length(data("one_store")) || length(data("two_store")) || length(data("thr_ee_store"))) || ' + - '((vlSelectionTest("one_store", datum)) && ' + - '(vlSelectionTest("two_store", datum, "union")) && ' + - '(!(vlSelectionTest("thr_ee_store", datum, "intersect"))))' + '!length(data("one_store")) || vlSelectionTest("one_store", datum)' ); - expect(expression(model, {selection: {or: ['one', {and: ['two', {not: 'thr-ee'}]}]}})).toEqual( - '!(length(data("one_store")) || length(data("two_store")) || length(data("thr_ee_store"))) || ' + - '((vlSelectionTest("one_store", datum)) || ' + - '((vlSelectionTest("two_store", datum, "union")) && ' + - '(!(vlSelectionTest("thr_ee_store", datum, "intersect")))))' + expect(expression(model, {not: {selection: 'one', empty: false}})).toEqual( + '!(length(data("one_store")) && vlSelectionTest("one_store", datum))' ); }); it('throws an error for unknown selections', () => { - expect(() => predicate(model, 'helloworld')).toThrow(); + expect(() => predicate(model, {selection: 'helloworld'})).toThrow(); }); });