From 798902876e2ca89c063c3e24fcc356565792a754 Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Mon, 11 Mar 2019 04:13:01 -0400 Subject: [PATCH 01/36] added clear transform to files added test suite for clear on multi adding single and interval clear adding test cases for single + interval clearing merge + squash + rebase --- src/compile/selection/index.ts | 1 + src/compile/selection/transforms/clear.ts | 19 ++++++++++++ .../selection/transforms/transforms.ts | 4 ++- src/selection.ts | 30 +++++++++++++++++++ 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 src/compile/selection/transforms/clear.ts diff --git a/src/compile/selection/index.ts b/src/compile/selection/index.ts index 8694b65f40..b3bd5b9657 100644 --- a/src/compile/selection/index.ts +++ b/src/compile/selection/index.ts @@ -50,6 +50,7 @@ export interface SelectionComponent { translate?: any; zoom?: any; nearest?: any; + clear?: any; } export interface SelectionCompiler { diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts new file mode 100644 index 0000000000..81729480ab --- /dev/null +++ b/src/compile/selection/transforms/clear.ts @@ -0,0 +1,19 @@ +import {TransformCompiler} from './transforms'; +import {TUPLE} from '..'; + +const clear: TransformCompiler = { + has: selCmpt => { + return selCmpt.type === 'multi' && selCmpt.clear !== 'none'; + }, + + signals: (model, selCmpt, signals) => { + const tupleIdx = signals.findIndex(i => i.name === selCmpt.name + TUPLE); + signals[tupleIdx].on.push({ + events: selCmpt.clear, + update: 'null' + }); + return signals; + } +}; + +export default clear; diff --git a/src/compile/selection/transforms/transforms.ts b/src/compile/selection/transforms/transforms.ts index ce3e514b43..ecee169eee 100644 --- a/src/compile/selection/transforms/transforms.ts +++ b/src/compile/selection/transforms/transforms.ts @@ -4,6 +4,7 @@ import {SelectionDef} from '../../../selection'; import {Dict} from '../../../util'; import {Model} from '../../model'; import {UnitModel} from '../../unit'; +import clear from './clear'; import inputs from './inputs'; import nearest from './nearest'; import project from './project'; @@ -28,7 +29,8 @@ const compilers: Dict = { translate, zoom, inputs, - nearest + nearest, + clear }; export function forEachTransform(selCmpt: SelectionComponent, cb: (tx: TransformCompiler) => void) { diff --git a/src/selection.ts b/src/selection.ts index ea0714558c..e03939836a 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -57,6 +57,15 @@ export interface BaseSelectionDef { } export interface SingleSelectionConfig extends BaseSelectionDef { + /** + * Controls clearing selections. Is a `string` that is one of the + * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * + * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * + * See the [TODO: clear] documentation for more information. + */ + clear?: string; /** * Establish a two-way binding between a single selection and input elements * (also known as dynamic query widgets). A binding takes the form of @@ -82,6 +91,16 @@ export interface SingleSelectionConfig extends BaseSelectionDef { } export interface MultiSelectionConfig extends BaseSelectionDef { + /** + * Controls clearing selections. Is a `string` that is one of the + * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * + * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * + * See the [TODO: clear] documentation for more information. + */ + clear?: string; + /** * Controls whether data values should be toggled or only ever inserted into * multi selections. Can be `true`, `false` (for insertion only), or a @@ -149,6 +168,16 @@ export interface BrushConfig { } export interface IntervalSelectionConfig extends BaseSelectionDef { + /** + * TODO: Update this + * Controls clearing selections. Is a `string` that is one of the + * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * + * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * + * See the [TODO: clear] documentation for more information. + */ + clear?: string; /** * When truthy, allows a user to interactively move an interval selection * back-and-forth. Can be `true`, `false` (to disable panning), or a @@ -247,6 +276,7 @@ export const defaultConfig: SelectionConfig = { multi: { on: 'click', fields: [SELECTION_ID], + clear: 'dblclick', toggle: 'event.shiftKey', resolve: 'global', empty: 'all' From 958360c8d4232b9ce6e8c06714f37abb6d573fff Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Wed, 13 Mar 2019 02:30:41 -0400 Subject: [PATCH 02/36] added test suite and modified clear to not occur on default - must flag as true at least modified default behavior and updated tests appropriately clear tx and modified dependent files testing editor linking clear tx working but slow removing unnecssary type updating tx type to modify existing signal added test suite and modified clear to not occur on default - must flag as true at least modified default behavior and updated tests appropriately readding schema file found in master branch --- src/compile/selection/transforms/clear.ts | 6 +- src/selection.ts | 28 +++--- test/compile/selection/clear.test.ts | 103 ++++++++++++++++++++++ test/compile/selection/multi.test.ts | 6 +- 4 files changed, 126 insertions(+), 17 deletions(-) create mode 100644 test/compile/selection/clear.test.ts diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index 81729480ab..c44bff92bc 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -1,15 +1,15 @@ -import {TransformCompiler} from './transforms'; import {TUPLE} from '..'; +import {TransformCompiler} from './transforms'; const clear: TransformCompiler = { has: selCmpt => { - return selCmpt.type === 'multi' && selCmpt.clear !== 'none'; + return selCmpt.type === 'multi' && selCmpt.clear; }, signals: (model, selCmpt, signals) => { const tupleIdx = signals.findIndex(i => i.name === selCmpt.name + TUPLE); signals[tupleIdx].on.push({ - events: selCmpt.clear, + events: [{source: 'scope', type: selCmpt.clear}], update: 'null' }); return signals; diff --git a/src/selection.ts b/src/selection.ts index e03939836a..9c8ce92177 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -58,14 +58,15 @@ export interface BaseSelectionDef { export interface SingleSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Is a `string` that is one of the - * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or a `string` that is + * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). * - * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * __Default value:__ `true`, which corresponds to `dblclick` (i.e. + * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string; + clear?: string | boolean; /** * Establish a two-way binding between a single selection and input elements * (also known as dynamic query widgets). A binding takes the form of @@ -92,14 +93,15 @@ export interface SingleSelectionConfig extends BaseSelectionDef { export interface MultiSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Is a `string` that is one of the - * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or a `string` that is + * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). * - * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * __Default value:__ `true`, which corresponds to `dblclick` (i.e. + * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string; + clear?: string | boolean; /** * Controls whether data values should be toggled or only ever inserted into @@ -169,15 +171,15 @@ export interface BrushConfig { export interface IntervalSelectionConfig extends BaseSelectionDef { /** - * TODO: Update this - * Controls clearing selections. Is a `string` that is one of the - * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or a `string` that is + * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). * - * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * __Default value:__ `true`, which corresponds to `dblclick` (i.e. + * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string; + clear?: string | boolean; /** * When truthy, allows a user to interactively move an interval selection * back-and-forth. Can be `true`, `false` (to disable panning), or a diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts new file mode 100644 index 0000000000..5795c38003 --- /dev/null +++ b/test/compile/selection/clear.test.ts @@ -0,0 +1,103 @@ +/* tslint:disable quotemark */ + +import {assembleUnitSelectionSignals} from '../../../src/compile/selection/assemble'; +import multi from '../../../src/compile/selection/multi'; +import {parseUnitSelection} from '../../../src/compile/selection/parse'; +import clear from '../../../src/compile/selection/transforms/clear'; +import {parseUnitModel} from '../../util'; + +describe('Clear Selection Transform', () => { + const model = parseUnitModel({ + mark: 'circle', + encoding: { + x: {field: 'Horsepower', type: 'quantitative'}, + y: {field: 'Miles_per_Gallon', type: 'quantitative'}, + color: {field: 'Origin', type: 'nominal'} + } + }); + + model.parseScale(); + const selCmpts = (model.component.selection = parseUnitSelection(model, { + one: {type: 'multi'}, + two: {type: 'multi', clear: 'dblclick'}, + three: {type: 'multi', clear: false}, + four: {type: 'multi', clear: null}, + five: {type: 'single'}, + six: {type: 'interval'} + })); + + it('identifies transform invocation', () => { + expect(clear.has(selCmpts['one'])).toBeTruthy(); + expect(clear.has(selCmpts['two'])).toBeTruthy(); + expect(clear.has(selCmpts['three'])).toBeFalsy(); + expect(clear.has(selCmpts['four'])).toBeFalsy(); + expect(clear.has(selCmpts['five'])).toBeFalsy(); + }); + + it('builds clear signals', () => { + const multiOneSg = multi.signals(model, selCmpts['one']); + expect(multiOneSg).toEqual([ + { + name: 'one_tuple', + on: [ + { + events: selCmpts['one'].events, + update: + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + force: true + } + ] + } + ]); + + const oneSg = clear.signals(model, selCmpts['one'], multiOneSg); + expect(oneSg).toEqual([ + { + name: 'one_tuple', + on: [ + { + events: selCmpts['one'].events, + update: + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + force: true + }, + {events: [{source: 'scope', type: selCmpts['one'].clear}], update: 'null'} + ] + } + ]); + + const multiTwoSg = multi.signals(model, selCmpts['two']); + expect(multiTwoSg).toEqual([ + { + name: 'two_tuple', + on: [ + { + events: selCmpts['two'].events, + update: + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + force: true + } + ] + } + ]); + + const twoSg = clear.signals(model, selCmpts['two'], multiTwoSg); + expect(twoSg).toEqual([ + { + name: 'two_tuple', + on: [ + { + events: selCmpts['two'].events, + update: + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + force: true + }, + {events: [{source: 'scope', type: selCmpts['two'].clear}], update: 'null'} + ] + } + ]); + + const signals = assembleUnitSelectionSignals(model, []); + expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg])); + }); +}); diff --git a/test/compile/selection/multi.test.ts b/test/compile/selection/multi.test.ts index 4a2acda6eb..4a0dbe144b 100644 --- a/test/compile/selection/multi.test.ts +++ b/test/compile/selection/multi.test.ts @@ -19,10 +19,11 @@ describe('Multi Selection', () => { }); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'multi'}, + one: {type: 'multi', clear: false}, two: { type: 'multi', nearest: true, + clear: false, on: 'mouseover', toggle: 'event.ctrlKey', encodings: ['y', 'color'] @@ -30,16 +31,19 @@ describe('Multi Selection', () => { 'thr-ee': { type: 'multi', fields: ['Horsepower'], + clear: false, init: {Horsepower: 50} }, four: { type: 'multi', encodings: ['x', 'color'], + clear: false, init: {Horsepower: 50, color: 'Japan'} }, five: { type: 'multi', fields: ['Year', 'Origin'], + clear: false, init: [ { Origin: 'Japan', From 5821af8574e502a1cef700000d108c739bbead2b Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Fri, 15 Mar 2019 14:24:33 -0400 Subject: [PATCH 03/36] adding single type support interval selection --- build/vega-lite-schema.json | 42 +++++++++++++++++++ .../interactive_bar_select_highlight.vg.json | 3 +- ...ctive_layered_crossfilter_discrete.vg.json | 12 ++++++ .../compiled/interactive_paintbrush.vg.json | 3 +- .../interactive_paintbrush_color.vg.json | 3 +- ...teractive_paintbrush_color_nearest.vg.json | 3 +- .../interactive_paintbrush_simple_all.vg.json | 3 +- ...interactive_paintbrush_simple_none.vg.json | 3 +- .../interactive_seattle_weather.vg.json | 4 ++ examples/compiled/selection_insert.vg.json | 3 +- .../selection_multi_condition.vg.json | 3 +- .../compiled/selection_project_multi.vg.json | 3 +- .../selection_project_multi_cylinders.vg.json | 3 +- ...ion_project_multi_cylinders_origin.vg.json | 3 +- .../selection_project_multi_origin.vg.json | 3 +- .../compiled/selection_toggle_altKey.vg.json | 3 +- .../selection_toggle_altKey_shiftKey.vg.json | 3 +- .../selection_toggle_shiftKey.vg.json | 3 +- .../compiled/selection_type_multi.vg.json | 3 +- examples/compiled/vconcat_flatten.vg.json | 4 ++ src/compile/selection/transforms/clear.ts | 2 +- src/selection.ts | 2 + 22 files changed, 97 insertions(+), 17 deletions(-) diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index 89b7369067..ac27aaf293 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -6316,6 +6316,13 @@ ], "type": "string" }, + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ @@ -6390,6 +6397,13 @@ ], "type": "string" }, + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ @@ -8327,6 +8341,13 @@ "MultiSelection": { "additionalProperties": false, "properties": { + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ @@ -8397,6 +8418,13 @@ "MultiSelectionConfig": { "additionalProperties": false, "properties": { + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ @@ -10158,6 +10186,13 @@ ], "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information." }, + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ @@ -10225,6 +10260,13 @@ ], "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information." }, + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ diff --git a/examples/compiled/interactive_bar_select_highlight.vg.json b/examples/compiled/interactive_bar_select_highlight.vg.json index 938e20732c..8ca84a8422 100644 --- a/examples/compiled/interactive_bar_select_highlight.vg.json +++ b/examples/compiled/interactive_bar_select_highlight.vg.json @@ -68,7 +68,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: select_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json index a3c044a22b..9431904dc9 100644 --- a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json +++ b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json @@ -185,6 +185,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"child__repeat_column_distance_layer_0\", fields: brush_tuple_fields, values: [[(item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_distance\"], (item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_distance_end\"]]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -351,6 +355,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"child__repeat_column_delay_layer_0\", fields: brush_tuple_fields, values: [[(item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_delay\"], (item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_delay_end\"]]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -517,6 +525,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"child__repeat_column_time_layer_0\", fields: brush_tuple_fields, values: [[(item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_time\"], (item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_time_end\"]]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_paintbrush.vg.json b/examples/compiled/interactive_paintbrush.vg.json index 99668db74b..33b7ee287d 100644 --- a/examples/compiled/interactive_paintbrush.vg.json +++ b/examples/compiled/interactive_paintbrush.vg.json @@ -34,7 +34,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_color.vg.json b/examples/compiled/interactive_paintbrush_color.vg.json index be33d18699..36e7cfe319 100644 --- a/examples/compiled/interactive_paintbrush_color.vg.json +++ b/examples/compiled/interactive_paintbrush_color.vg.json @@ -34,7 +34,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_color_nearest.vg.json b/examples/compiled/interactive_paintbrush_color_nearest.vg.json index fe2e77a642..ea1493ef50 100644 --- a/examples/compiled/interactive_paintbrush_color_nearest.vg.json +++ b/examples/compiled/interactive_paintbrush_color_nearest.vg.json @@ -34,7 +34,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_all.vg.json b/examples/compiled/interactive_paintbrush_simple_all.vg.json index f02c643157..c846449144 100644 --- a/examples/compiled/interactive_paintbrush_simple_all.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_all.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_none.vg.json b/examples/compiled/interactive_paintbrush_simple_none.vg.json index dc50846a8c..0f790a3545 100644 --- a/examples/compiled/interactive_paintbrush_simple_none.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_none.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index 01f1b70907..7619c0c29c 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -423,6 +423,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1\", fields: click_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"weather\"]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_insert.vg.json b/examples/compiled/selection_insert.vg.json index ceda29d8a2..dd462ba94b 100644 --- a/examples/compiled/selection_insert.vg.json +++ b/examples/compiled/selection_insert.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index c50dcb21df..f289715d29 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -239,7 +239,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: hoverbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_multi.vg.json b/examples/compiled/selection_project_multi.vg.json index 86bbad1868..10dfb4cdf6 100644 --- a/examples/compiled/selection_project_multi.vg.json +++ b/examples/compiled/selection_project_multi.vg.json @@ -30,7 +30,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, diff --git a/examples/compiled/selection_project_multi_cylinders.vg.json b/examples/compiled/selection_project_multi_cylinders.vg.json index 1ad6c5c137..b592f6e42f 100644 --- a/examples/compiled/selection_project_multi_cylinders.vg.json +++ b/examples/compiled/selection_project_multi_cylinders.vg.json @@ -25,7 +25,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Cylinders\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_multi_cylinders_origin.vg.json b/examples/compiled/selection_project_multi_cylinders_origin.vg.json index efbd77b63c..bec3a7438b 100644 --- a/examples/compiled/selection_project_multi_cylinders_origin.vg.json +++ b/examples/compiled/selection_project_multi_cylinders_origin.vg.json @@ -25,7 +25,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Cylinders\"], (item().isVoronoi ? datum.datum : datum)[\"Origin\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_multi_origin.vg.json b/examples/compiled/selection_project_multi_origin.vg.json index a43c6fd2a7..7c63396154 100644 --- a/examples/compiled/selection_project_multi_origin.vg.json +++ b/examples/compiled/selection_project_multi_origin.vg.json @@ -25,7 +25,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Origin\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "Origin"}]}, diff --git a/examples/compiled/selection_toggle_altKey.vg.json b/examples/compiled/selection_toggle_altKey.vg.json index 1e49936970..7c858f3b01 100644 --- a/examples/compiled/selection_toggle_altKey.vg.json +++ b/examples/compiled/selection_toggle_altKey.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json index df0d99b28e..eef8fb868d 100644 --- a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_toggle_shiftKey.vg.json b/examples/compiled/selection_toggle_shiftKey.vg.json index 760ef4e8e7..9b6c53dcc4 100644 --- a/examples/compiled/selection_toggle_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_shiftKey.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_multi.vg.json b/examples/compiled/selection_type_multi.vg.json index 2f8cfac52c..d9426fe100 100644 --- a/examples/compiled/selection_type_multi.vg.json +++ b/examples/compiled/selection_type_multi.vg.json @@ -45,7 +45,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, diff --git a/examples/compiled/vconcat_flatten.vg.json b/examples/compiled/vconcat_flatten.vg.json index 1cb99475a7..87e2eabc65 100644 --- a/examples/compiled/vconcat_flatten.vg.json +++ b/examples/compiled/vconcat_flatten.vg.json @@ -101,6 +101,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_0\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"id\"]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index c44bff92bc..f1db7e4ebd 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -3,7 +3,7 @@ import {TransformCompiler} from './transforms'; const clear: TransformCompiler = { has: selCmpt => { - return selCmpt.type === 'multi' && selCmpt.clear; + return selCmpt.clear; }, signals: (model, selCmpt, signals) => { diff --git a/src/selection.ts b/src/selection.ts index 9c8ce92177..c347afa8b1 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -272,6 +272,7 @@ export const defaultConfig: SelectionConfig = { single: { on: 'click', fields: [SELECTION_ID], + clear: 'dblclick', resolve: 'global', empty: 'all' }, @@ -286,6 +287,7 @@ export const defaultConfig: SelectionConfig = { interval: { on: '[mousedown, window:mouseup] > window:mousemove!', encodings: ['x', 'y'], + clear: 'dblclick', translate: '[mousedown, window:mouseup] > window:mousemove!', zoom: 'wheel!', mark: {fill: '#333', fillOpacity: 0.125, stroke: 'white'}, From ef5f6b81da81e1c66747322d9e0c8bbccea590cc Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Fri, 15 Mar 2019 16:03:21 -0400 Subject: [PATCH 04/36] adding test cases for single + interval clearing adding single type support [Travis] Update schema (build: 22277) [Travis] Update examples (build: 22277) interval selection adding test cases for single + interval clearing --- src/selection.ts | 1 - test/compile/selection/clear.test.ts | 107 +++++++++++++++++------- test/compile/selection/interval.test.ts | 7 +- 3 files changed, 83 insertions(+), 32 deletions(-) diff --git a/src/selection.ts b/src/selection.ts index c347afa8b1..fe836846c9 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -272,7 +272,6 @@ export const defaultConfig: SelectionConfig = { single: { on: 'click', fields: [SELECTION_ID], - clear: 'dblclick', resolve: 'global', empty: 'all' }, diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts index 5795c38003..4cc0b3e18a 100644 --- a/test/compile/selection/clear.test.ts +++ b/test/compile/selection/clear.test.ts @@ -1,8 +1,10 @@ /* tslint:disable quotemark */ import {assembleUnitSelectionSignals} from '../../../src/compile/selection/assemble'; +import interval from '../../../src/compile/selection/interval'; import multi from '../../../src/compile/selection/multi'; import {parseUnitSelection} from '../../../src/compile/selection/parse'; +import single from '../../../src/compile/selection/single'; import clear from '../../../src/compile/selection/transforms/clear'; import {parseUnitModel} from '../../util'; @@ -18,25 +20,39 @@ describe('Clear Selection Transform', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'multi'}, - two: {type: 'multi', clear: 'dblclick'}, - three: {type: 'multi', clear: false}, - four: {type: 'multi', clear: null}, - five: {type: 'single'}, - six: {type: 'interval'} + one: {type: 'single', clear: true}, + two: {type: 'multi'}, + three: {type: 'interval', encodings: ['x']}, + four: {type: 'single', clear: 'mouseout'}, + five: {type: 'multi', clear: 'mouseout'}, + six: {type: 'interval', encodings: ['x'], clear: 'mouseout'}, + seven: {type: 'single'}, + eight: {type: 'multi', clear: false}, + nine: {type: 'interval', encodings: ['x'], clear: false}, + ten: {type: 'single', clear: null}, + eleven: {type: 'multi', clear: null}, + twelve: {type: 'interval', encodings: ['x'], clear: null} })); it('identifies transform invocation', () => { expect(clear.has(selCmpts['one'])).toBeTruthy(); expect(clear.has(selCmpts['two'])).toBeTruthy(); - expect(clear.has(selCmpts['three'])).toBeFalsy(); - expect(clear.has(selCmpts['four'])).toBeFalsy(); - expect(clear.has(selCmpts['five'])).toBeFalsy(); + expect(clear.has(selCmpts['three'])).toBeTruthy(); + expect(clear.has(selCmpts['four'])).toBeTruthy(); + expect(clear.has(selCmpts['five'])).toBeTruthy(); + expect(clear.has(selCmpts['six'])).toBeTruthy(); + expect(clear.has(selCmpts['seven'])).toBeFalsy(); + expect(clear.has(selCmpts['eight'])).toBeFalsy(); + expect(clear.has(selCmpts['nine'])).toBeFalsy(); + expect(clear.has(selCmpts['ten'])).toBeFalsy(); + expect(clear.has(selCmpts['eleven'])).toBeFalsy(); + expect(clear.has(selCmpts['twelve'])).toBeFalsy(); }); it('builds clear signals', () => { - const multiOneSg = multi.signals(model, selCmpts['one']); - expect(multiOneSg).toEqual([ + const singleOneSg = single.signals(model, selCmpts['one']); + const oneSg = clear.signals(model, selCmpts['one'], singleOneSg); + expect(oneSg).toEqual([ { name: 'one_tuple', on: [ @@ -45,58 +61,89 @@ describe('Clear Selection Transform', () => { update: 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true - } + }, + {events: [{source: 'scope', type: selCmpts['one'].clear}], update: 'null'} ] } ]); - const oneSg = clear.signals(model, selCmpts['one'], multiOneSg); - expect(oneSg).toEqual([ + const multiTwoSg = multi.signals(model, selCmpts['two']); + const twoSg = clear.signals(model, selCmpts['two'], multiTwoSg); + expect(twoSg).toEqual([ { - name: 'one_tuple', + name: 'two_tuple', on: [ { - events: selCmpts['one'].events, + events: selCmpts['two'].events, update: - 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['one'].clear}], update: 'null'} + {events: [{source: 'scope', type: selCmpts['two'].clear}], update: 'null'} ] } ]); - const multiTwoSg = multi.signals(model, selCmpts['two']); - expect(multiTwoSg).toEqual([ + const intervalThreeSg = interval.signals(model, selCmpts['three']); + const threeSg = clear.signals(model, selCmpts['three'], intervalThreeSg); + expect(threeSg).toContainEqual({ + name: 'three_tuple', + on: [ + { + events: [{signal: 'three_Horsepower'}], + update: 'three_Horsepower ? {unit: "", fields: three_tuple_fields, values: [three_Horsepower]} : null' + }, + {events: [{source: 'scope', type: selCmpts['three'].clear}], update: 'null'} + ] + }); + + const singleFourSg = single.signals(model, selCmpts['four']); + const fourSg = clear.signals(model, selCmpts['four'], singleFourSg); + expect(fourSg).toEqual([ { - name: 'two_tuple', + name: 'four_tuple', on: [ { - events: selCmpts['two'].events, + events: selCmpts['four'].events, update: - 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: four_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true - } + }, + {events: [{source: 'scope', type: selCmpts['four'].clear}], update: 'null'} ] } ]); - const twoSg = clear.signals(model, selCmpts['two'], multiTwoSg); - expect(twoSg).toEqual([ + const multiFiveSg = multi.signals(model, selCmpts['five']); + const fiveSg = clear.signals(model, selCmpts['five'], multiFiveSg); + expect(fiveSg).toEqual([ { - name: 'two_tuple', + name: 'five_tuple', on: [ { - events: selCmpts['two'].events, + events: selCmpts['five'].events, update: - 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: five_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['two'].clear}], update: 'null'} + {events: [{source: 'scope', type: selCmpts['five'].clear}], update: 'null'} ] } ]); + const intervalSixSg = interval.signals(model, selCmpts['six']); + const sixSg = clear.signals(model, selCmpts['six'], intervalSixSg); + expect(sixSg).toContainEqual({ + name: 'six_tuple', + on: [ + { + events: [{signal: 'six_Horsepower'}], + update: 'six_Horsepower ? {unit: "", fields: six_tuple_fields, values: [six_Horsepower]} : null' + }, + {events: [{source: 'scope', type: selCmpts['six'].clear}], update: 'null'} + ] + }); + const signals = assembleUnitSelectionSignals(model, []); expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg])); }); diff --git a/test/compile/selection/interval.test.ts b/test/compile/selection/interval.test.ts index c4f6ff3fdf..bf4f668d62 100644 --- a/test/compile/selection/interval.test.ts +++ b/test/compile/selection/interval.test.ts @@ -18,17 +18,19 @@ describe('Interval Selections', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'interval', encodings: ['x'], translate: false, zoom: false}, + one: {type: 'interval', encodings: ['x'], clear: false, translate: false, zoom: false}, two: { type: 'interval', encodings: ['y'], bind: 'scales', + clear: false, translate: false, zoom: false }, 'thr-ee': { type: 'interval', on: '[mousedown, mouseup] > mousemove, [keydown, keyup] > keypress', + clear: false, translate: false, zoom: false, resolve: 'intersect', @@ -44,6 +46,7 @@ describe('Interval Selections', () => { }, four: { type: 'interval', + clear: false, translate: false, zoom: false, encodings: ['x'], @@ -51,12 +54,14 @@ describe('Interval Selections', () => { }, five: { type: 'interval', + clear: false, translate: false, zoom: false, init: {x: [50, 60], y: [23, 54]} }, six: { type: 'interval', + clear: false, translate: false, zoom: false, encodings: ['x'], From dd068190d8bedf92241c7656bde9b9da10ec035d Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 15 Mar 2019 20:37:51 +0000 Subject: [PATCH 05/36] [Travis] Update examples (build: 22361) --- examples/compiled/brush_table.vg.json | 4 ++ .../circle_bubble_health_income.vg.json | 3 +- .../compiled/interactive_area_brush.vg.json | 3 +- examples/compiled/interactive_brush.vg.json | 3 +- .../interactive_dashboard_europe_pop.vg.json | 12 ++++ .../interactive_layered_crossfilter.vg.json | 12 ++++ .../interactive_overview_detail.vg.json | 4 ++ .../interactive_paintbrush_interval.vg.json | 3 +- .../interactive_panzoom_splom.vg.json | 36 ++++++++++ ...interactive_panzoom_vconcat_shared.vg.json | 4 ++ .../interactive_seattle_weather.vg.json | 4 ++ examples/compiled/interactive_splom.vg.json | 72 +++++++++++++++++++ examples/compiled/isotype_grid.vg.json | 3 +- .../compiled/selection_brush_timeunit.vg.json | 4 ++ .../selection_composition_and.vg.json | 6 +- .../compiled/selection_composition_or.vg.json | 6 +- examples/compiled/selection_concat.vg.json | 8 +++ examples/compiled/selection_filter.vg.json | 4 ++ .../selection_filter_composition.vg.json | 4 ++ .../selection_interval_mark_style.vg.json | 6 +- .../selection_layer_bar_month.vg.json | 3 +- .../selection_multi_condition.vg.json | 3 +- .../selection_project_binned_interval.vg.json | 3 +- .../selection_project_interval.vg.json | 3 +- .../selection_project_interval_x.vg.json | 3 +- .../selection_project_interval_x_y.vg.json | 3 +- .../selection_project_interval_y.vg.json | 3 +- .../selection_resolution_global.vg.json | 36 ++++++++++ .../selection_resolution_intersect.vg.json | 36 ++++++++++ .../selection_resolution_union.vg.json | 36 ++++++++++ .../selection_translate_brush_drag.vg.json | 3 +- ...lection_translate_brush_shift-drag.vg.json | 3 +- ...lection_translate_scatterplot_drag.vg.json | 3 +- ...n_translate_scatterplot_shift-drag.vg.json | 3 +- .../compiled/selection_type_interval.vg.json | 3 +- .../selection_type_interval_invert.vg.json | 3 +- .../selection_zoom_brush_shift-wheel.vg.json | 3 +- .../selection_zoom_brush_wheel.vg.json | 3 +- ...ction_zoom_scatterplot_shift-wheel.vg.json | 3 +- .../selection_zoom_scatterplot_wheel.vg.json | 3 +- examples/compiled/trellis_selections.vg.json | 8 +++ 41 files changed, 340 insertions(+), 28 deletions(-) diff --git a/examples/compiled/brush_table.vg.json b/examples/compiled/brush_table.vg.json index 198ab6a9d6..e9784365cc 100644 --- a/examples/compiled/brush_table.vg.json +++ b/examples/compiled/brush_table.vg.json @@ -205,6 +205,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/circle_bubble_health_income.vg.json b/examples/compiled/circle_bubble_health_income.vg.json index 27a0bcd7e0..7355a50e45 100644 --- a/examples/compiled/circle_bubble_health_income.vg.json +++ b/examples/compiled/circle_bubble_health_income.vg.json @@ -55,7 +55,8 @@ { "events": [{"signal": "view_income || view_health"}], "update": "view_income && view_health ? {unit: \"\", fields: view_tuple_fields, values: [view_income,view_health]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_area_brush.vg.json b/examples/compiled/interactive_area_brush.vg.json index 5dca76fdff..48f451c74d 100644 --- a/examples/compiled/interactive_area_brush.vg.json +++ b/examples/compiled/interactive_area_brush.vg.json @@ -127,7 +127,8 @@ { "events": [{"signal": "brush_yearmonth_date"}], "update": "brush_yearmonth_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_yearmonth_date]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_brush.vg.json b/examples/compiled/interactive_brush.vg.json index 4df558eb72..fa259827d8 100644 --- a/examples/compiled/interactive_brush.vg.json +++ b/examples/compiled/interactive_brush.vg.json @@ -142,7 +142,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_dashboard_europe_pop.vg.json b/examples/compiled/interactive_dashboard_europe_pop.vg.json index 1b6761d064..81463ab159 100644 --- a/examples/compiled/interactive_dashboard_europe_pop.vg.json +++ b/examples/compiled/interactive_dashboard_europe_pop.vg.json @@ -401,6 +401,10 @@ { "events": [{"signal": "brush_Country"}], "update": "brush_Country ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Country]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -709,6 +713,10 @@ { "events": [{"signal": "brush_Country"}], "update": "brush_Country ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_Country]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1079,6 +1087,10 @@ } ], "update": "brush_Population_ages_65_and_above_of_total && brush_Population_ages_15_64_of_total ? {unit: \"concat_2\", fields: brush_tuple_fields, values: [brush_Population_ages_65_and_above_of_total,brush_Population_ages_15_64_of_total]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter.vg.json b/examples/compiled/interactive_layered_crossfilter.vg.json index 8855470ab5..423ba0ed9e 100644 --- a/examples/compiled/interactive_layered_crossfilter.vg.json +++ b/examples/compiled/interactive_layered_crossfilter.vg.json @@ -243,6 +243,10 @@ { "events": [{"signal": "brush_distance"}], "update": "brush_distance ? {unit: \"child__repeat_column_distance_layer_0\", fields: brush_tuple_fields, values: [brush_distance]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -613,6 +617,10 @@ { "events": [{"signal": "brush_delay"}], "update": "brush_delay ? {unit: \"child__repeat_column_delay_layer_0\", fields: brush_tuple_fields, values: [brush_delay]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -983,6 +991,10 @@ { "events": [{"signal": "brush_time"}], "update": "brush_time ? {unit: \"child__repeat_column_time_layer_0\", fields: brush_tuple_fields, values: [brush_time]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_overview_detail.vg.json b/examples/compiled/interactive_overview_detail.vg.json index 9eb1cfc064..cf54dc113f 100644 --- a/examples/compiled/interactive_overview_detail.vg.json +++ b/examples/compiled/interactive_overview_detail.vg.json @@ -183,6 +183,10 @@ { "events": [{"signal": "brush_date"}], "update": "brush_date ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_date]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_paintbrush_interval.vg.json b/examples/compiled/interactive_paintbrush_interval.vg.json index dca8852b53..489c090cbd 100644 --- a/examples/compiled/interactive_paintbrush_interval.vg.json +++ b/examples/compiled/interactive_paintbrush_interval.vg.json @@ -144,7 +144,8 @@ {"signal": "paintbrush_Horsepower || paintbrush_Miles_per_Gallon"} ], "update": "paintbrush_Horsepower && paintbrush_Miles_per_Gallon ? {unit: \"\", fields: paintbrush_tuple_fields, values: [paintbrush_Horsepower,paintbrush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_panzoom_splom.vg.json b/examples/compiled/interactive_panzoom_splom.vg.json index 179492d33c..d39c03ef04 100644 --- a/examples/compiled/interactive_panzoom_splom.vg.json +++ b/examples/compiled/interactive_panzoom_splom.vg.json @@ -70,6 +70,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Horsepower"} ], "update": "grid_Miles_per_Gallon && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -264,6 +268,10 @@ { "events": [{"signal": "grid_Acceleration || grid_Horsepower"}], "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -444,6 +452,10 @@ { "events": [{"signal": "grid_Horsepower"}], "update": "grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -637,6 +649,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Acceleration"} ], "update": "grid_Miles_per_Gallon && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -817,6 +833,10 @@ { "events": [{"signal": "grid_Acceleration"}], "update": "grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1008,6 +1028,10 @@ { "events": [{"signal": "grid_Horsepower || grid_Acceleration"}], "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1188,6 +1212,10 @@ { "events": [{"signal": "grid_Miles_per_Gallon"}], "update": "grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1381,6 +1409,10 @@ {"signal": "grid_Acceleration || grid_Miles_per_Gallon"} ], "update": "grid_Acceleration && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1577,6 +1609,10 @@ {"signal": "grid_Horsepower || grid_Miles_per_Gallon"} ], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json index 2cd6317923..daba971bde 100644 --- a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json +++ b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json @@ -73,6 +73,10 @@ {"signal": "region_Horsepower || region_Miles_per_Gallon"} ], "update": "region_Horsepower && region_Miles_per_Gallon ? {unit: \"concat_0\", fields: region_tuple_fields, values: [region_Horsepower,region_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index 7619c0c29c..27df46ab50 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -146,6 +146,10 @@ { "events": [{"signal": "brush_monthdate_date"}], "update": "brush_monthdate_date ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_monthdate_date]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_splom.vg.json b/examples/compiled/interactive_splom.vg.json index 2d8a9bd09f..16d259dbf1 100644 --- a/examples/compiled/interactive_splom.vg.json +++ b/examples/compiled/interactive_splom.vg.json @@ -165,6 +165,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -292,6 +296,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Horsepower"} ], "update": "grid_Miles_per_Gallon && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -643,6 +651,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -768,6 +780,10 @@ { "events": [{"signal": "grid_Acceleration || grid_Horsepower"}], "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1062,6 +1078,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1170,6 +1190,10 @@ { "events": [{"signal": "grid_Horsepower"}], "update": "grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1517,6 +1541,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1644,6 +1672,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Acceleration"} ], "update": "grid_Miles_per_Gallon && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1938,6 +1970,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2046,6 +2082,10 @@ { "events": [{"signal": "grid_Acceleration"}], "update": "grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2391,6 +2431,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2516,6 +2560,10 @@ { "events": [{"signal": "grid_Horsepower || grid_Acceleration"}], "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2810,6 +2858,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2918,6 +2970,10 @@ { "events": [{"signal": "grid_Miles_per_Gallon"}], "update": "grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3265,6 +3321,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3392,6 +3452,10 @@ {"signal": "grid_Acceleration || grid_Miles_per_Gallon"} ], "update": "grid_Acceleration && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3745,6 +3809,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3872,6 +3940,10 @@ {"signal": "grid_Horsepower || grid_Miles_per_Gallon"} ], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/isotype_grid.vg.json b/examples/compiled/isotype_grid.vg.json index da5ceec060..f749a6984e 100644 --- a/examples/compiled/isotype_grid.vg.json +++ b/examples/compiled/isotype_grid.vg.json @@ -244,7 +244,8 @@ { "events": [{"signal": "highlight_col || highlight_row"}], "update": "highlight_col && highlight_row ? {unit: \"\", fields: highlight_tuple_fields, values: [highlight_col,highlight_row]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_brush_timeunit.vg.json b/examples/compiled/selection_brush_timeunit.vg.json index 95dd03ee14..b7b97275e6 100644 --- a/examples/compiled/selection_brush_timeunit.vg.json +++ b/examples/compiled/selection_brush_timeunit.vg.json @@ -133,6 +133,10 @@ { "events": [{"signal": "brush_seconds_date"}], "update": "brush_seconds_date ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_seconds_date]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_composition_and.vg.json b/examples/compiled/selection_composition_and.vg.json index 9eac8055ec..12651459a1 100644 --- a/examples/compiled/selection_composition_and.vg.json +++ b/examples/compiled/selection_composition_and.vg.json @@ -154,7 +154,8 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -358,7 +359,8 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_composition_or.vg.json b/examples/compiled/selection_composition_or.vg.json index a6ae20b46f..094b8c3485 100644 --- a/examples/compiled/selection_composition_or.vg.json +++ b/examples/compiled/selection_composition_or.vg.json @@ -154,7 +154,8 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -358,7 +359,8 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_concat.vg.json b/examples/compiled/selection_concat.vg.json index 98bc0d0e18..008cbedc5b 100644 --- a/examples/compiled/selection_concat.vg.json +++ b/examples/compiled/selection_concat.vg.json @@ -161,6 +161,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -460,6 +464,10 @@ { "events": [{"signal": "grid_Displacement || grid_Acceleration"}], "update": "grid_Displacement && grid_Acceleration ? {unit: \"concat_1\", fields: grid_tuple_fields, values: [grid_Displacement,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json index 968f88195f..e0566eaac1 100644 --- a/examples/compiled/selection_filter.vg.json +++ b/examples/compiled/selection_filter.vg.json @@ -164,6 +164,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json index ff09616ddf..1f9deb4b95 100644 --- a/examples/compiled/selection_filter_composition.vg.json +++ b/examples/compiled/selection_filter_composition.vg.json @@ -164,6 +164,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_interval_mark_style.vg.json b/examples/compiled/selection_interval_mark_style.vg.json index 0af4fa867e..e5be9a94c0 100644 --- a/examples/compiled/selection_interval_mark_style.vg.json +++ b/examples/compiled/selection_interval_mark_style.vg.json @@ -154,7 +154,8 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -358,7 +359,8 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_layer_bar_month.vg.json b/examples/compiled/selection_layer_bar_month.vg.json index dccf7a428e..03adad5b29 100644 --- a/examples/compiled/selection_layer_bar_month.vg.json +++ b/examples/compiled/selection_layer_bar_month.vg.json @@ -129,7 +129,8 @@ { "events": [{"signal": "brush_month_date"}], "update": "brush_month_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_month_date]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index f289715d29..4e63d61a76 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -149,7 +149,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_binned_interval.vg.json b/examples/compiled/selection_project_binned_interval.vg.json index 9d08f1f311..04b8a62c8d 100644 --- a/examples/compiled/selection_project_binned_interval.vg.json +++ b/examples/compiled/selection_project_binned_interval.vg.json @@ -141,7 +141,8 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval.vg.json b/examples/compiled/selection_project_interval.vg.json index d68908e20a..05699629e8 100644 --- a/examples/compiled/selection_project_interval.vg.json +++ b/examples/compiled/selection_project_interval.vg.json @@ -146,7 +146,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_x.vg.json b/examples/compiled/selection_project_interval_x.vg.json index 9dac87b773..0131e201ad 100644 --- a/examples/compiled/selection_project_interval_x.vg.json +++ b/examples/compiled/selection_project_interval_x.vg.json @@ -96,7 +96,8 @@ { "events": [{"signal": "pts_Cylinders"}], "update": "pts_Cylinders ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_x_y.vg.json b/examples/compiled/selection_project_interval_x_y.vg.json index d68908e20a..05699629e8 100644 --- a/examples/compiled/selection_project_interval_x_y.vg.json +++ b/examples/compiled/selection_project_interval_x_y.vg.json @@ -146,7 +146,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_y.vg.json b/examples/compiled/selection_project_interval_y.vg.json index 46f863e0c4..fed2894cf6 100644 --- a/examples/compiled/selection_project_interval_y.vg.json +++ b/examples/compiled/selection_project_interval_y.vg.json @@ -96,7 +96,8 @@ { "events": [{"signal": "pts_Origin"}], "update": "pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_resolution_global.vg.json b/examples/compiled/selection_resolution_global.vg.json index 7b8c58962a..736ee0310e 100644 --- a/examples/compiled/selection_resolution_global.vg.json +++ b/examples/compiled/selection_resolution_global.vg.json @@ -150,6 +150,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -543,6 +547,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -881,6 +889,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1270,6 +1282,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1608,6 +1624,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1995,6 +2015,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2333,6 +2357,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2722,6 +2750,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3117,6 +3149,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_intersect.vg.json b/examples/compiled/selection_resolution_intersect.vg.json index 98f0a1d5b4..3afda5d5ae 100644 --- a/examples/compiled/selection_resolution_intersect.vg.json +++ b/examples/compiled/selection_resolution_intersect.vg.json @@ -153,6 +153,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -498,6 +502,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -788,6 +796,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1129,6 +1141,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1419,6 +1435,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1758,6 +1778,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2048,6 +2072,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2389,6 +2417,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2736,6 +2768,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_union.vg.json b/examples/compiled/selection_resolution_union.vg.json index 72e17e164a..cd7ada134a 100644 --- a/examples/compiled/selection_resolution_union.vg.json +++ b/examples/compiled/selection_resolution_union.vg.json @@ -153,6 +153,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -498,6 +502,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -788,6 +796,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1129,6 +1141,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1419,6 +1435,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1758,6 +1778,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2048,6 +2072,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2389,6 +2417,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2736,6 +2768,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json index 5c3b96a9c7..56c15b3bf4 100644 --- a/examples/compiled/selection_translate_brush_drag.vg.json +++ b/examples/compiled/selection_translate_brush_drag.vg.json @@ -138,7 +138,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json index 60551a3a30..546117d1d3 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.vg.json +++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json @@ -138,7 +138,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_drag.vg.json b/examples/compiled/selection_translate_scatterplot_drag.vg.json index 93698301db..15a30f27fb 100644 --- a/examples/compiled/selection_translate_scatterplot_drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_drag.vg.json @@ -50,7 +50,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json index 5e2b3945dc..901ae21e13 100644 --- a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json @@ -50,7 +50,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_interval.vg.json b/examples/compiled/selection_type_interval.vg.json index d68908e20a..05699629e8 100644 --- a/examples/compiled/selection_type_interval.vg.json +++ b/examples/compiled/selection_type_interval.vg.json @@ -146,7 +146,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_interval_invert.vg.json b/examples/compiled/selection_type_interval_invert.vg.json index e25be08a6f..c723e3d5d3 100644 --- a/examples/compiled/selection_type_interval_invert.vg.json +++ b/examples/compiled/selection_type_interval_invert.vg.json @@ -146,7 +146,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json index 86e08418ec..f255993b96 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json @@ -138,7 +138,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json index 5c3b96a9c7..56c15b3bf4 100644 --- a/examples/compiled/selection_zoom_brush_wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_wheel.vg.json @@ -138,7 +138,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json index 7c4fbb4925..34c07d034d 100644 --- a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json @@ -50,7 +50,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json index 93698301db..15a30f27fb 100644 --- a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json @@ -50,7 +50,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/trellis_selections.vg.json b/examples/compiled/trellis_selections.vg.json index 8753d639ed..f6f635f693 100644 --- a/examples/compiled/trellis_selections.vg.json +++ b/examples/compiled/trellis_selections.vg.json @@ -204,6 +204,10 @@ { "events": [{"signal": "brush_X"}], "update": "brush_X ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: brush_tuple_fields, values: [brush_X]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -323,6 +327,10 @@ { "events": [{"signal": "grid_X || grid_Y"}], "update": "grid_X && grid_Y ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: grid_tuple_fields, values: [grid_X,grid_Y]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, From de29ed0669bb2a57ae6c6c2520bab2ea9c1c0822 Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Thu, 21 Mar 2019 00:53:47 -0400 Subject: [PATCH 06/36] Clear transform default doubleclick clears selected data and brush, working with all example interactive visualizations --- src/compile/selection/transforms/clear.ts | 24 +++++++++++++++---- .../selection/transforms/transforms.ts | 18 ++++---------- src/selection.ts | 16 ++++++------- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index f1db7e4ebd..8295e4848c 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -1,16 +1,32 @@ import {TUPLE} from '..'; +import {selector as parseSelector} from 'vega-event-selector'; import {TransformCompiler} from './transforms'; +const CLEAR_DATA_SIGNALS = [TUPLE, '_toggle']; +const CLEAR_VISUAL_SIGNALS = ['_x', '_y']; + +const CLEAR_SIGNALS = [CLEAR_DATA_SIGNALS, CLEAR_VISUAL_SIGNALS]; +const CLEAR_UPDATE = ['null', '[0, 0]']; + const clear: TransformCompiler = { has: selCmpt => { return selCmpt.clear; }, signals: (model, selCmpt, signals) => { - const tupleIdx = signals.findIndex(i => i.name === selCmpt.name + TUPLE); - signals[tupleIdx].on.push({ - events: [{source: 'scope', type: selCmpt.clear}], - update: 'null' + let events = parseSelector(selCmpt.clear, 'scope'); + CLEAR_SIGNALS.forEach((signal, k) => { + for (let i = 0; i < signal.length; i++) { + const idx = signals.findIndex(n => n.name === selCmpt.name + signal[i]); + if (idx !== -1) { + signals[idx].on = signals[idx].on + ? signals[idx].on.concat({ + events: events, + update: CLEAR_UPDATE[k] + }) + : [{events: events, update: CLEAR_UPDATE[k]}]; + } + } }); return signals; } diff --git a/src/compile/selection/transforms/transforms.ts b/src/compile/selection/transforms/transforms.ts index ecee169eee..3b2cf2c3b4 100644 --- a/src/compile/selection/transforms/transforms.ts +++ b/src/compile/selection/transforms/transforms.ts @@ -1,7 +1,6 @@ import {NewSignal, Signal} from 'vega'; import {SelectionComponent} from '..'; import {SelectionDef} from '../../../selection'; -import {Dict} from '../../../util'; import {Model} from '../../model'; import {UnitModel} from '../../unit'; import clear from './clear'; @@ -22,21 +21,12 @@ export interface TransformCompiler { marks?: (model: UnitModel, selCmpt: SelectionComponent, marks: any[]) => any[]; } -const compilers: Dict = { - project, - toggle, - scales, - translate, - zoom, - inputs, - nearest, - clear -}; +const compilers: Array = [project, toggle, scales, translate, zoom, inputs, nearest, clear]; export function forEachTransform(selCmpt: SelectionComponent, cb: (tx: TransformCompiler) => void) { - for (const t in compilers) { - if (compilers[t].has(selCmpt)) { - cb(compilers[t]); + for (const t of compilers) { + if (t.has(selCmpt)) { + cb(t); } } } diff --git a/src/selection.ts b/src/selection.ts index fe836846c9..3cd91301a1 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -58,15 +58,14 @@ export interface BaseSelectionDef { export interface SingleSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Can be `true`, `false`, or a `string` that is - * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/). * * __Default value:__ `true`, which corresponds to `dblclick` (i.e. * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string | boolean; + clear?: EventStream | boolean; /** * Establish a two-way binding between a single selection and input elements * (also known as dynamic query widgets). A binding takes the form of @@ -93,15 +92,14 @@ export interface SingleSelectionConfig extends BaseSelectionDef { export interface MultiSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Can be `true`, `false`, or a `string` that is - * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/). * * __Default value:__ `true`, which corresponds to `dblclick` (i.e. * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string | boolean; + clear?: EventStream | boolean; /** * Controls whether data values should be toggled or only ever inserted into @@ -171,15 +169,14 @@ export interface BrushConfig { export interface IntervalSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Can be `true`, `false`, or a `string` that is - * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/). * * __Default value:__ `true`, which corresponds to `dblclick` (i.e. * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string | boolean; + clear?: EventStream | boolean; /** * When truthy, allows a user to interactively move an interval selection * back-and-forth. Can be `true`, `false` (to disable panning), or a @@ -272,6 +269,7 @@ export const defaultConfig: SelectionConfig = { single: { on: 'click', fields: [SELECTION_ID], + clear: 'dblclick', resolve: 'global', empty: 'all' }, From 0c3d12271597d906c6691aa637a99075c5da7e45 Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Thu, 21 Mar 2019 02:02:08 -0400 Subject: [PATCH 07/36] adding test cases for clear.ts and updating other test files to turn clear off for those tests --- src/compile/selection/transforms/clear.ts | 9 +- .../selection/transforms/transforms.ts | 2 +- test/compile/selection/clear.test.ts | 175 +++++++++++------- test/compile/selection/inputs.test.ts | 6 + test/compile/selection/single.test.ts | 5 +- test/compile/selection/toggle.test.ts | 11 +- 6 files changed, 134 insertions(+), 74 deletions(-) diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index 8295e4848c..a5a033f885 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -1,5 +1,5 @@ -import {TUPLE} from '..'; import {selector as parseSelector} from 'vega-event-selector'; +import {TUPLE} from '..'; import {TransformCompiler} from './transforms'; const CLEAR_DATA_SIGNALS = [TUPLE, '_toggle']; @@ -14,10 +14,11 @@ const clear: TransformCompiler = { }, signals: (model, selCmpt, signals) => { - let events = parseSelector(selCmpt.clear, 'scope'); + const events = parseSelector(selCmpt.clear, 'scope'); + CLEAR_SIGNALS.forEach((signal, k) => { - for (let i = 0; i < signal.length; i++) { - const idx = signals.findIndex(n => n.name === selCmpt.name + signal[i]); + for (const ext of signal) { + const idx = signals.findIndex(n => n.name === selCmpt.name + ext); if (idx !== -1) { signals[idx].on = signals[idx].on ? signals[idx].on.concat({ diff --git a/src/compile/selection/transforms/transforms.ts b/src/compile/selection/transforms/transforms.ts index 3b2cf2c3b4..aedc9d4087 100644 --- a/src/compile/selection/transforms/transforms.ts +++ b/src/compile/selection/transforms/transforms.ts @@ -21,7 +21,7 @@ export interface TransformCompiler { marks?: (model: UnitModel, selCmpt: SelectionComponent, marks: any[]) => any[]; } -const compilers: Array = [project, toggle, scales, translate, zoom, inputs, nearest, clear]; +const compilers: TransformCompiler[] = [project, toggle, scales, translate, zoom, inputs, nearest, clear]; export function forEachTransform(selCmpt: SelectionComponent, cb: (tx: TransformCompiler) => void) { for (const t of compilers) { diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts index 4cc0b3e18a..01dbb1aa60 100644 --- a/test/compile/selection/clear.test.ts +++ b/test/compile/selection/clear.test.ts @@ -1,5 +1,6 @@ /* tslint:disable quotemark */ +import {selector as parseSelector} from 'vega-event-selector'; import {assembleUnitSelectionSignals} from '../../../src/compile/selection/assemble'; import interval from '../../../src/compile/selection/interval'; import multi from '../../../src/compile/selection/multi'; @@ -8,7 +9,7 @@ import single from '../../../src/compile/selection/single'; import clear from '../../../src/compile/selection/transforms/clear'; import {parseUnitModel} from '../../util'; -describe('Clear Selection Transform', () => { +describe('Clear selection transform, single and multi types', () => { const model = parseUnitModel({ mark: 'circle', encoding: { @@ -20,18 +21,12 @@ describe('Clear Selection Transform', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'single', clear: true}, + one: {type: 'single'}, two: {type: 'multi'}, - three: {type: 'interval', encodings: ['x']}, - four: {type: 'single', clear: 'mouseout'}, - five: {type: 'multi', clear: 'mouseout'}, - six: {type: 'interval', encodings: ['x'], clear: 'mouseout'}, - seven: {type: 'single'}, - eight: {type: 'multi', clear: false}, - nine: {type: 'interval', encodings: ['x'], clear: false}, - ten: {type: 'single', clear: null}, - eleven: {type: 'multi', clear: null}, - twelve: {type: 'interval', encodings: ['x'], clear: null} + three: {type: 'single', clear: 'mouseout'}, + four: {type: 'multi', clear: 'mouseout'}, + five: {type: 'single', clear: false}, + six: {type: 'multi', clear: false} })); it('identifies transform invocation', () => { @@ -39,17 +34,11 @@ describe('Clear Selection Transform', () => { expect(clear.has(selCmpts['two'])).toBeTruthy(); expect(clear.has(selCmpts['three'])).toBeTruthy(); expect(clear.has(selCmpts['four'])).toBeTruthy(); - expect(clear.has(selCmpts['five'])).toBeTruthy(); - expect(clear.has(selCmpts['six'])).toBeTruthy(); - expect(clear.has(selCmpts['seven'])).toBeFalsy(); - expect(clear.has(selCmpts['eight'])).toBeFalsy(); - expect(clear.has(selCmpts['nine'])).toBeFalsy(); - expect(clear.has(selCmpts['ten'])).toBeFalsy(); - expect(clear.has(selCmpts['eleven'])).toBeFalsy(); - expect(clear.has(selCmpts['twelve'])).toBeFalsy(); + expect(clear.has(selCmpts['five'])).toBeFalsy(); + expect(clear.has(selCmpts['six'])).toBeFalsy(); }); - it('builds clear signals', () => { + it('appends clear transform', () => { const singleOneSg = single.signals(model, selCmpts['one']); const oneSg = clear.signals(model, selCmpts['one'], singleOneSg); expect(oneSg).toEqual([ @@ -62,7 +51,7 @@ describe('Clear Selection Transform', () => { 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['one'].clear}], update: 'null'} + {events: parseSelector(selCmpts['one'].clear, 'scope'), update: 'null'} ] } ]); @@ -79,72 +68,132 @@ describe('Clear Selection Transform', () => { 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['two'].clear}], update: 'null'} + {events: parseSelector(selCmpts['two'].clear, 'scope'), update: 'null'} ] } ]); - const intervalThreeSg = interval.signals(model, selCmpts['three']); - const threeSg = clear.signals(model, selCmpts['three'], intervalThreeSg); - expect(threeSg).toContainEqual({ - name: 'three_tuple', - on: [ - { - events: [{signal: 'three_Horsepower'}], - update: 'three_Horsepower ? {unit: "", fields: three_tuple_fields, values: [three_Horsepower]} : null' - }, - {events: [{source: 'scope', type: selCmpts['three'].clear}], update: 'null'} - ] - }); - - const singleFourSg = single.signals(model, selCmpts['four']); - const fourSg = clear.signals(model, selCmpts['four'], singleFourSg); - expect(fourSg).toEqual([ + const singleThreeSg = single.signals(model, selCmpts['three']); + const threeSg = clear.signals(model, selCmpts['three'], singleThreeSg); + expect(threeSg).toEqual([ { - name: 'four_tuple', + name: 'three_tuple', on: [ { - events: selCmpts['four'].events, + events: selCmpts['three'].events, update: - 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: four_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: three_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['four'].clear}], update: 'null'} + {events: parseSelector(selCmpts['three'].clear, 'scope'), update: 'null'} ] } ]); - const multiFiveSg = multi.signals(model, selCmpts['five']); - const fiveSg = clear.signals(model, selCmpts['five'], multiFiveSg); - expect(fiveSg).toEqual([ + const multiFourSg = multi.signals(model, selCmpts['four']); + const fourSg = clear.signals(model, selCmpts['four'], multiFourSg); + expect(fourSg).toEqual([ { - name: 'five_tuple', + name: 'four_tuple', on: [ { - events: selCmpts['five'].events, + events: selCmpts['four'].events, update: - 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: five_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: four_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['five'].clear}], update: 'null'} + {events: parseSelector(selCmpts['four'].clear, 'scope'), update: 'null'} ] } ]); - const intervalSixSg = interval.signals(model, selCmpts['six']); - const sixSg = clear.signals(model, selCmpts['six'], intervalSixSg); - expect(sixSg).toContainEqual({ - name: 'six_tuple', - on: [ - { - events: [{signal: 'six_Horsepower'}], - update: 'six_Horsepower ? {unit: "", fields: six_tuple_fields, values: [six_Horsepower]} : null' - }, - {events: [{source: 'scope', type: selCmpts['six'].clear}], update: 'null'} - ] - }); - const signals = assembleUnitSelectionSignals(model, []); expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg])); }); }); + +describe('Clear selection transform, interval type', () => { + const model = parseUnitModel({ + mark: 'point', + encoding: { + x: {field: 'Horsepower', type: 'quantitative'}, + y: {field: 'Miles_per_Gallon', type: 'quantitative'}, + color: {field: 'Origin', type: 'nominal'} + } + }); + + model.parseScale(); + const selCmpts = (model.component.selection = parseUnitSelection(model, { + one: {type: 'interval', encodings: ['x', 'y'], translate: false, zoom: false}, + two: {type: 'interval', encodings: ['x', 'y'], clear: false, translate: false, zoom: false} + })); + + it('identifies transform invocation', () => { + expect(clear.has(selCmpts['one'])).toBeTruthy(); + expect(clear.has(selCmpts['two'])).toBeFalsy(); + }); + + it('appends clear transform', () => { + const intervalOneSg = interval.signals(model, selCmpts['one']); + const oneSg = clear.signals(model, selCmpts['one'], intervalOneSg); + expect(oneSg).toEqual( + expect.arrayContaining([ + { + name: 'one_x', + value: [], + on: [ + { + events: parseSelector('mousedown', 'scope')[0], + update: '[x(unit), x(unit)]' + }, + { + events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0], + update: '[one_x[0], clamp(x(unit), 0, width)]' + }, + { + events: {signal: 'one_scale_trigger'}, + update: '[scale("x", one_Horsepower[0]), scale("x", one_Horsepower[1])]' + }, + { + events: parseSelector(selCmpts['one'].clear, 'scope'), + update: '[0, 0]' + } + ] + }, + { + name: 'one_y', + value: [], + on: [ + { + events: parseSelector('mousedown', 'scope')[0], + update: '[y(unit), y(unit)]' + }, + { + events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0], + update: '[one_y[0], clamp(y(unit), 0, height)]' + }, + { + events: {signal: 'one_scale_trigger'}, + update: '[scale("y", one_Miles_per_Gallon[0]), scale("y", one_Miles_per_Gallon[1])]' + }, + { + events: parseSelector(selCmpts['one'].clear, 'scope'), + update: '[0, 0]' + } + ] + }, + { + name: 'one_tuple', + on: [ + { + events: [{signal: 'one_Horsepower || one_Miles_per_Gallon'}], + update: + 'one_Horsepower && one_Miles_per_Gallon ? {unit: "", fields: one_tuple_fields, values: [one_Horsepower,one_Miles_per_Gallon]} : null' + }, + {events: parseSelector(selCmpts['one'].clear, 'scope'), update: 'null'} + ] + } + ]) + ); + }); +}); diff --git a/test/compile/selection/inputs.test.ts b/test/compile/selection/inputs.test.ts index 90651f47f8..b782a8afd1 100644 --- a/test/compile/selection/inputs.test.ts +++ b/test/compile/selection/inputs.test.ts @@ -19,15 +19,18 @@ describe('Inputs Selection Transform', () => { const selCmpts = parseUnitSelection(model, { one: { type: 'single', + clear: false, bind: {input: 'range', min: 0, max: 10, step: 1} }, two: { type: 'single', + clear: false, fields: ['Cylinders', 'Horsepower'], bind: {input: 'range', min: 0, max: 10, step: 1} }, three: { type: 'single', + clear: false, nearest: true, fields: ['Cylinders', 'Origin'], bind: { @@ -37,14 +40,17 @@ describe('Inputs Selection Transform', () => { }, four: { type: 'single', + clear: false, bind: null }, six: { type: 'interval', + clear: false, bind: 'scales' }, seven: { type: 'single', + clear: false, fields: ['Year'], bind: { Year: {input: 'range', min: 1970, max: 1980, step: 1} diff --git a/test/compile/selection/single.test.ts b/test/compile/selection/single.test.ts index 66e0317ad6..c5e62f9cf3 100644 --- a/test/compile/selection/single.test.ts +++ b/test/compile/selection/single.test.ts @@ -22,9 +22,10 @@ describe('Single Selection', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'single'}, + one: {type: 'single', clear: false}, two: { type: 'single', + clear: false, nearest: true, on: 'mouseover', encodings: ['y', 'color'], @@ -32,11 +33,13 @@ describe('Single Selection', () => { }, 'thr-ee': { type: 'single', + clear: false, fields: ['Horsepower'], init: {Horsepower: 50} }, four: { type: 'single', + clear: false, encodings: ['x', 'color'], init: {x: 50, Origin: 'Japan'} } diff --git a/test/compile/selection/toggle.test.ts b/test/compile/selection/toggle.test.ts index 0f3b83cf1c..d3c28d47f9 100644 --- a/test/compile/selection/toggle.test.ts +++ b/test/compile/selection/toggle.test.ts @@ -17,18 +17,19 @@ describe('Toggle Selection Transform', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'multi'}, + one: {type: 'multi', clear: false}, two: { type: 'multi', resolve: 'union', on: 'mouseover', + clear: false, toggle: 'event.ctrlKey', encodings: ['y', 'color'] }, - three: {type: 'multi', toggle: false}, - four: {type: 'multi', toggle: null}, - five: {type: 'single'}, - six: {type: 'interval'} + three: {type: 'multi', clear: false, toggle: false}, + four: {type: 'multi', clear: false, toggle: null}, + five: {type: 'single', clear: false}, + six: {type: 'interval', clear: false} })); it('identifies transform invocation', () => { From 1505a1e4006f7f2ae2512feefc164b3f871c282d Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Mon, 11 Mar 2019 04:13:01 -0400 Subject: [PATCH 08/36] added clear transform to files added test suite for clear on multi adding single and interval clear adding test cases for single + interval clearing merge + squash + rebase --- src/compile/selection/index.ts | 1 + src/compile/selection/transforms/clear.ts | 19 ++++++++++++ .../selection/transforms/transforms.ts | 4 ++- src/selection.ts | 30 +++++++++++++++++++ 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 src/compile/selection/transforms/clear.ts diff --git a/src/compile/selection/index.ts b/src/compile/selection/index.ts index 8694b65f40..b3bd5b9657 100644 --- a/src/compile/selection/index.ts +++ b/src/compile/selection/index.ts @@ -50,6 +50,7 @@ export interface SelectionComponent { translate?: any; zoom?: any; nearest?: any; + clear?: any; } export interface SelectionCompiler { diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts new file mode 100644 index 0000000000..81729480ab --- /dev/null +++ b/src/compile/selection/transforms/clear.ts @@ -0,0 +1,19 @@ +import {TransformCompiler} from './transforms'; +import {TUPLE} from '..'; + +const clear: TransformCompiler = { + has: selCmpt => { + return selCmpt.type === 'multi' && selCmpt.clear !== 'none'; + }, + + signals: (model, selCmpt, signals) => { + const tupleIdx = signals.findIndex(i => i.name === selCmpt.name + TUPLE); + signals[tupleIdx].on.push({ + events: selCmpt.clear, + update: 'null' + }); + return signals; + } +}; + +export default clear; diff --git a/src/compile/selection/transforms/transforms.ts b/src/compile/selection/transforms/transforms.ts index ce3e514b43..ecee169eee 100644 --- a/src/compile/selection/transforms/transforms.ts +++ b/src/compile/selection/transforms/transforms.ts @@ -4,6 +4,7 @@ import {SelectionDef} from '../../../selection'; import {Dict} from '../../../util'; import {Model} from '../../model'; import {UnitModel} from '../../unit'; +import clear from './clear'; import inputs from './inputs'; import nearest from './nearest'; import project from './project'; @@ -28,7 +29,8 @@ const compilers: Dict = { translate, zoom, inputs, - nearest + nearest, + clear }; export function forEachTransform(selCmpt: SelectionComponent, cb: (tx: TransformCompiler) => void) { diff --git a/src/selection.ts b/src/selection.ts index 27fcd46c3e..96b5fb3625 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -57,6 +57,15 @@ export interface BaseSelectionDef { } export interface SingleSelectionConfig extends BaseSelectionDef { + /** + * Controls clearing selections. Is a `string` that is one of the + * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * + * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * + * See the [TODO: clear] documentation for more information. + */ + clear?: string; /** * Establish a two-way binding between a single selection and input elements * (also known as dynamic query widgets). A binding takes the form of @@ -82,6 +91,16 @@ export interface SingleSelectionConfig extends BaseSelectionDef { } export interface MultiSelectionConfig extends BaseSelectionDef { + /** + * Controls clearing selections. Is a `string` that is one of the + * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * + * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * + * See the [TODO: clear] documentation for more information. + */ + clear?: string; + /** * Controls whether data values should be toggled or only ever inserted into * multi selections. Can be `true`, `false` (for insertion only), or a @@ -149,6 +168,16 @@ export interface BrushConfig { } export interface IntervalSelectionConfig extends BaseSelectionDef { + /** + * TODO: Update this + * Controls clearing selections. Is a `string` that is one of the + * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * + * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * + * See the [TODO: clear] documentation for more information. + */ + clear?: string; /** * When truthy, allows a user to interactively move an interval selection * back-and-forth. Can be `true`, `false` (to disable panning), or a @@ -247,6 +276,7 @@ export const defaultConfig: SelectionConfig = { multi: { on: 'click', fields: [SELECTION_ID], + clear: 'dblclick', toggle: 'event.shiftKey', resolve: 'global', empty: 'all' From 7249a100b97b632df1bfb4b78d7130bacb2606c6 Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Wed, 13 Mar 2019 02:30:41 -0400 Subject: [PATCH 09/36] added test suite and modified clear to not occur on default - must flag as true at least modified default behavior and updated tests appropriately clear tx and modified dependent files testing editor linking clear tx working but slow removing unnecssary type updating tx type to modify existing signal added test suite and modified clear to not occur on default - must flag as true at least modified default behavior and updated tests appropriately readding schema file found in master branch --- src/compile/selection/transforms/clear.ts | 6 +- src/selection.ts | 28 +++--- test/compile/selection/clear.test.ts | 103 ++++++++++++++++++++++ test/compile/selection/multi.test.ts | 6 +- 4 files changed, 126 insertions(+), 17 deletions(-) create mode 100644 test/compile/selection/clear.test.ts diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index 81729480ab..c44bff92bc 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -1,15 +1,15 @@ -import {TransformCompiler} from './transforms'; import {TUPLE} from '..'; +import {TransformCompiler} from './transforms'; const clear: TransformCompiler = { has: selCmpt => { - return selCmpt.type === 'multi' && selCmpt.clear !== 'none'; + return selCmpt.type === 'multi' && selCmpt.clear; }, signals: (model, selCmpt, signals) => { const tupleIdx = signals.findIndex(i => i.name === selCmpt.name + TUPLE); signals[tupleIdx].on.push({ - events: selCmpt.clear, + events: [{source: 'scope', type: selCmpt.clear}], update: 'null' }); return signals; diff --git a/src/selection.ts b/src/selection.ts index 96b5fb3625..0516b3aebf 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -58,14 +58,15 @@ export interface BaseSelectionDef { export interface SingleSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Is a `string` that is one of the - * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or a `string` that is + * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). * - * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * __Default value:__ `true`, which corresponds to `dblclick` (i.e. + * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string; + clear?: string | boolean; /** * Establish a two-way binding between a single selection and input elements * (also known as dynamic query widgets). A binding takes the form of @@ -92,14 +93,15 @@ export interface SingleSelectionConfig extends BaseSelectionDef { export interface MultiSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Is a `string` that is one of the - * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or a `string` that is + * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). * - * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * __Default value:__ `true`, which corresponds to `dblclick` (i.e. + * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string; + clear?: string | boolean; /** * Controls whether data values should be toggled or only ever inserted into @@ -169,15 +171,15 @@ export interface BrushConfig { export interface IntervalSelectionConfig extends BaseSelectionDef { /** - * TODO: Update this - * Controls clearing selections. Is a `string` that is one of the - * [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or a `string` that is + * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). * - * __Default value:__ `dblclick` (i.e. user doubleclick clears current selection). + * __Default value:__ `true`, which corresponds to `dblclick` (i.e. + * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string; + clear?: string | boolean; /** * When truthy, allows a user to interactively move an interval selection * back-and-forth. Can be `true`, `false` (to disable panning), or a diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts new file mode 100644 index 0000000000..5795c38003 --- /dev/null +++ b/test/compile/selection/clear.test.ts @@ -0,0 +1,103 @@ +/* tslint:disable quotemark */ + +import {assembleUnitSelectionSignals} from '../../../src/compile/selection/assemble'; +import multi from '../../../src/compile/selection/multi'; +import {parseUnitSelection} from '../../../src/compile/selection/parse'; +import clear from '../../../src/compile/selection/transforms/clear'; +import {parseUnitModel} from '../../util'; + +describe('Clear Selection Transform', () => { + const model = parseUnitModel({ + mark: 'circle', + encoding: { + x: {field: 'Horsepower', type: 'quantitative'}, + y: {field: 'Miles_per_Gallon', type: 'quantitative'}, + color: {field: 'Origin', type: 'nominal'} + } + }); + + model.parseScale(); + const selCmpts = (model.component.selection = parseUnitSelection(model, { + one: {type: 'multi'}, + two: {type: 'multi', clear: 'dblclick'}, + three: {type: 'multi', clear: false}, + four: {type: 'multi', clear: null}, + five: {type: 'single'}, + six: {type: 'interval'} + })); + + it('identifies transform invocation', () => { + expect(clear.has(selCmpts['one'])).toBeTruthy(); + expect(clear.has(selCmpts['two'])).toBeTruthy(); + expect(clear.has(selCmpts['three'])).toBeFalsy(); + expect(clear.has(selCmpts['four'])).toBeFalsy(); + expect(clear.has(selCmpts['five'])).toBeFalsy(); + }); + + it('builds clear signals', () => { + const multiOneSg = multi.signals(model, selCmpts['one']); + expect(multiOneSg).toEqual([ + { + name: 'one_tuple', + on: [ + { + events: selCmpts['one'].events, + update: + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + force: true + } + ] + } + ]); + + const oneSg = clear.signals(model, selCmpts['one'], multiOneSg); + expect(oneSg).toEqual([ + { + name: 'one_tuple', + on: [ + { + events: selCmpts['one'].events, + update: + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + force: true + }, + {events: [{source: 'scope', type: selCmpts['one'].clear}], update: 'null'} + ] + } + ]); + + const multiTwoSg = multi.signals(model, selCmpts['two']); + expect(multiTwoSg).toEqual([ + { + name: 'two_tuple', + on: [ + { + events: selCmpts['two'].events, + update: + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + force: true + } + ] + } + ]); + + const twoSg = clear.signals(model, selCmpts['two'], multiTwoSg); + expect(twoSg).toEqual([ + { + name: 'two_tuple', + on: [ + { + events: selCmpts['two'].events, + update: + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + force: true + }, + {events: [{source: 'scope', type: selCmpts['two'].clear}], update: 'null'} + ] + } + ]); + + const signals = assembleUnitSelectionSignals(model, []); + expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg])); + }); +}); diff --git a/test/compile/selection/multi.test.ts b/test/compile/selection/multi.test.ts index 4a2acda6eb..4a0dbe144b 100644 --- a/test/compile/selection/multi.test.ts +++ b/test/compile/selection/multi.test.ts @@ -19,10 +19,11 @@ describe('Multi Selection', () => { }); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'multi'}, + one: {type: 'multi', clear: false}, two: { type: 'multi', nearest: true, + clear: false, on: 'mouseover', toggle: 'event.ctrlKey', encodings: ['y', 'color'] @@ -30,16 +31,19 @@ describe('Multi Selection', () => { 'thr-ee': { type: 'multi', fields: ['Horsepower'], + clear: false, init: {Horsepower: 50} }, four: { type: 'multi', encodings: ['x', 'color'], + clear: false, init: {Horsepower: 50, color: 'Japan'} }, five: { type: 'multi', fields: ['Year', 'Origin'], + clear: false, init: [ { Origin: 'Japan', From 3cba48248e7e408b3815bf066a8fc96160695657 Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Fri, 15 Mar 2019 14:24:33 -0400 Subject: [PATCH 10/36] adding single type support interval selection --- build/vega-lite-schema.json | 42 +++++++++++++++++++ .../interactive_bar_select_highlight.vg.json | 3 +- ...ctive_layered_crossfilter_discrete.vg.json | 12 ++++++ .../compiled/interactive_paintbrush.vg.json | 3 +- .../interactive_paintbrush_color.vg.json | 3 +- ...teractive_paintbrush_color_nearest.vg.json | 3 +- .../interactive_paintbrush_simple_all.vg.json | 3 +- ...interactive_paintbrush_simple_none.vg.json | 3 +- .../interactive_seattle_weather.vg.json | 4 ++ examples/compiled/selection_insert.vg.json | 3 +- .../selection_multi_condition.vg.json | 3 +- .../compiled/selection_project_multi.vg.json | 3 +- .../selection_project_multi_cylinders.vg.json | 3 +- ...ion_project_multi_cylinders_origin.vg.json | 3 +- .../selection_project_multi_origin.vg.json | 3 +- .../compiled/selection_toggle_altKey.vg.json | 3 +- .../selection_toggle_altKey_shiftKey.vg.json | 3 +- .../selection_toggle_shiftKey.vg.json | 3 +- .../compiled/selection_type_multi.vg.json | 3 +- examples/compiled/vconcat_flatten.vg.json | 4 ++ src/compile/selection/transforms/clear.ts | 2 +- src/selection.ts | 2 + 22 files changed, 97 insertions(+), 17 deletions(-) diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index ab08a465f4..b5220c384e 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -6483,6 +6483,13 @@ ], "type": "string" }, + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ @@ -6557,6 +6564,13 @@ ], "type": "string" }, + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ @@ -8494,6 +8508,13 @@ "MultiSelection": { "additionalProperties": false, "properties": { + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ @@ -8564,6 +8585,13 @@ "MultiSelectionConfig": { "additionalProperties": false, "properties": { + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ @@ -10397,6 +10425,13 @@ ], "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information." }, + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ @@ -10464,6 +10499,13 @@ ], "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information." }, + "clear": { + "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", + "type": [ + "string", + "boolean" + ] + }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ diff --git a/examples/compiled/interactive_bar_select_highlight.vg.json b/examples/compiled/interactive_bar_select_highlight.vg.json index 938e20732c..8ca84a8422 100644 --- a/examples/compiled/interactive_bar_select_highlight.vg.json +++ b/examples/compiled/interactive_bar_select_highlight.vg.json @@ -68,7 +68,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: select_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json index a3c044a22b..9431904dc9 100644 --- a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json +++ b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json @@ -185,6 +185,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"child__repeat_column_distance_layer_0\", fields: brush_tuple_fields, values: [[(item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_distance\"], (item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_distance_end\"]]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -351,6 +355,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"child__repeat_column_delay_layer_0\", fields: brush_tuple_fields, values: [[(item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_delay\"], (item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_delay_end\"]]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -517,6 +525,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"child__repeat_column_time_layer_0\", fields: brush_tuple_fields, values: [[(item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_time\"], (item().isVoronoi ? datum.datum : datum)[\"bin_maxbins_20_time_end\"]]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_paintbrush.vg.json b/examples/compiled/interactive_paintbrush.vg.json index 60daa82c97..50ae712753 100644 --- a/examples/compiled/interactive_paintbrush.vg.json +++ b/examples/compiled/interactive_paintbrush.vg.json @@ -34,7 +34,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_color.vg.json b/examples/compiled/interactive_paintbrush_color.vg.json index be33d18699..36e7cfe319 100644 --- a/examples/compiled/interactive_paintbrush_color.vg.json +++ b/examples/compiled/interactive_paintbrush_color.vg.json @@ -34,7 +34,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_color_nearest.vg.json b/examples/compiled/interactive_paintbrush_color_nearest.vg.json index e3531ad42b..769d7b6838 100644 --- a/examples/compiled/interactive_paintbrush_color_nearest.vg.json +++ b/examples/compiled/interactive_paintbrush_color_nearest.vg.json @@ -34,7 +34,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_all.vg.json b/examples/compiled/interactive_paintbrush_simple_all.vg.json index f02c643157..c846449144 100644 --- a/examples/compiled/interactive_paintbrush_simple_all.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_all.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_none.vg.json b/examples/compiled/interactive_paintbrush_simple_none.vg.json index dc50846a8c..0f790a3545 100644 --- a/examples/compiled/interactive_paintbrush_simple_none.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_none.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index c283438360..4c530fbb01 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -429,6 +429,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1\", fields: click_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"weather\"]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_insert.vg.json b/examples/compiled/selection_insert.vg.json index ceda29d8a2..dd462ba94b 100644 --- a/examples/compiled/selection_insert.vg.json +++ b/examples/compiled/selection_insert.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index 5ad013d9c6..4272f4be29 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -245,7 +245,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: hoverbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_multi.vg.json b/examples/compiled/selection_project_multi.vg.json index 86bbad1868..10dfb4cdf6 100644 --- a/examples/compiled/selection_project_multi.vg.json +++ b/examples/compiled/selection_project_multi.vg.json @@ -30,7 +30,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, diff --git a/examples/compiled/selection_project_multi_cylinders.vg.json b/examples/compiled/selection_project_multi_cylinders.vg.json index 1ad6c5c137..b592f6e42f 100644 --- a/examples/compiled/selection_project_multi_cylinders.vg.json +++ b/examples/compiled/selection_project_multi_cylinders.vg.json @@ -25,7 +25,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Cylinders\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_multi_cylinders_origin.vg.json b/examples/compiled/selection_project_multi_cylinders_origin.vg.json index efbd77b63c..bec3a7438b 100644 --- a/examples/compiled/selection_project_multi_cylinders_origin.vg.json +++ b/examples/compiled/selection_project_multi_cylinders_origin.vg.json @@ -25,7 +25,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Cylinders\"], (item().isVoronoi ? datum.datum : datum)[\"Origin\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_multi_origin.vg.json b/examples/compiled/selection_project_multi_origin.vg.json index a43c6fd2a7..7c63396154 100644 --- a/examples/compiled/selection_project_multi_origin.vg.json +++ b/examples/compiled/selection_project_multi_origin.vg.json @@ -25,7 +25,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Origin\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "Origin"}]}, diff --git a/examples/compiled/selection_toggle_altKey.vg.json b/examples/compiled/selection_toggle_altKey.vg.json index 1e49936970..7c858f3b01 100644 --- a/examples/compiled/selection_toggle_altKey.vg.json +++ b/examples/compiled/selection_toggle_altKey.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json index df0d99b28e..eef8fb868d 100644 --- a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_toggle_shiftKey.vg.json b/examples/compiled/selection_toggle_shiftKey.vg.json index 760ef4e8e7..9b6c53dcc4 100644 --- a/examples/compiled/selection_toggle_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_shiftKey.vg.json @@ -33,7 +33,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_multi.vg.json b/examples/compiled/selection_type_multi.vg.json index 2f8cfac52c..d9426fe100 100644 --- a/examples/compiled/selection_type_multi.vg.json +++ b/examples/compiled/selection_type_multi.vg.json @@ -45,7 +45,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, diff --git a/examples/compiled/vconcat_flatten.vg.json b/examples/compiled/vconcat_flatten.vg.json index 1cb99475a7..87e2eabc65 100644 --- a/examples/compiled/vconcat_flatten.vg.json +++ b/examples/compiled/vconcat_flatten.vg.json @@ -101,6 +101,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_0\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"id\"]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index c44bff92bc..f1db7e4ebd 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -3,7 +3,7 @@ import {TransformCompiler} from './transforms'; const clear: TransformCompiler = { has: selCmpt => { - return selCmpt.type === 'multi' && selCmpt.clear; + return selCmpt.clear; }, signals: (model, selCmpt, signals) => { diff --git a/src/selection.ts b/src/selection.ts index 0516b3aebf..4f9a0afa28 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -272,6 +272,7 @@ export const defaultConfig: SelectionConfig = { single: { on: 'click', fields: [SELECTION_ID], + clear: 'dblclick', resolve: 'global', empty: 'all' }, @@ -286,6 +287,7 @@ export const defaultConfig: SelectionConfig = { interval: { on: '[mousedown, window:mouseup] > window:mousemove!', encodings: ['x', 'y'], + clear: 'dblclick', translate: '[mousedown, window:mouseup] > window:mousemove!', zoom: 'wheel!', mark: {fill: '#333', fillOpacity: 0.125, stroke: 'white'}, From d49d694e97e4fa7ef674eb400853851b375999f9 Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Fri, 15 Mar 2019 16:03:21 -0400 Subject: [PATCH 11/36] adding test cases for single + interval clearing adding single type support [Travis] Update schema (build: 22277) [Travis] Update examples (build: 22277) interval selection adding test cases for single + interval clearing --- src/selection.ts | 1 - test/compile/selection/clear.test.ts | 107 +++++++++++++++++------- test/compile/selection/interval.test.ts | 7 +- 3 files changed, 83 insertions(+), 32 deletions(-) diff --git a/src/selection.ts b/src/selection.ts index 4f9a0afa28..a97a7a088d 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -272,7 +272,6 @@ export const defaultConfig: SelectionConfig = { single: { on: 'click', fields: [SELECTION_ID], - clear: 'dblclick', resolve: 'global', empty: 'all' }, diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts index 5795c38003..4cc0b3e18a 100644 --- a/test/compile/selection/clear.test.ts +++ b/test/compile/selection/clear.test.ts @@ -1,8 +1,10 @@ /* tslint:disable quotemark */ import {assembleUnitSelectionSignals} from '../../../src/compile/selection/assemble'; +import interval from '../../../src/compile/selection/interval'; import multi from '../../../src/compile/selection/multi'; import {parseUnitSelection} from '../../../src/compile/selection/parse'; +import single from '../../../src/compile/selection/single'; import clear from '../../../src/compile/selection/transforms/clear'; import {parseUnitModel} from '../../util'; @@ -18,25 +20,39 @@ describe('Clear Selection Transform', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'multi'}, - two: {type: 'multi', clear: 'dblclick'}, - three: {type: 'multi', clear: false}, - four: {type: 'multi', clear: null}, - five: {type: 'single'}, - six: {type: 'interval'} + one: {type: 'single', clear: true}, + two: {type: 'multi'}, + three: {type: 'interval', encodings: ['x']}, + four: {type: 'single', clear: 'mouseout'}, + five: {type: 'multi', clear: 'mouseout'}, + six: {type: 'interval', encodings: ['x'], clear: 'mouseout'}, + seven: {type: 'single'}, + eight: {type: 'multi', clear: false}, + nine: {type: 'interval', encodings: ['x'], clear: false}, + ten: {type: 'single', clear: null}, + eleven: {type: 'multi', clear: null}, + twelve: {type: 'interval', encodings: ['x'], clear: null} })); it('identifies transform invocation', () => { expect(clear.has(selCmpts['one'])).toBeTruthy(); expect(clear.has(selCmpts['two'])).toBeTruthy(); - expect(clear.has(selCmpts['three'])).toBeFalsy(); - expect(clear.has(selCmpts['four'])).toBeFalsy(); - expect(clear.has(selCmpts['five'])).toBeFalsy(); + expect(clear.has(selCmpts['three'])).toBeTruthy(); + expect(clear.has(selCmpts['four'])).toBeTruthy(); + expect(clear.has(selCmpts['five'])).toBeTruthy(); + expect(clear.has(selCmpts['six'])).toBeTruthy(); + expect(clear.has(selCmpts['seven'])).toBeFalsy(); + expect(clear.has(selCmpts['eight'])).toBeFalsy(); + expect(clear.has(selCmpts['nine'])).toBeFalsy(); + expect(clear.has(selCmpts['ten'])).toBeFalsy(); + expect(clear.has(selCmpts['eleven'])).toBeFalsy(); + expect(clear.has(selCmpts['twelve'])).toBeFalsy(); }); it('builds clear signals', () => { - const multiOneSg = multi.signals(model, selCmpts['one']); - expect(multiOneSg).toEqual([ + const singleOneSg = single.signals(model, selCmpts['one']); + const oneSg = clear.signals(model, selCmpts['one'], singleOneSg); + expect(oneSg).toEqual([ { name: 'one_tuple', on: [ @@ -45,58 +61,89 @@ describe('Clear Selection Transform', () => { update: 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true - } + }, + {events: [{source: 'scope', type: selCmpts['one'].clear}], update: 'null'} ] } ]); - const oneSg = clear.signals(model, selCmpts['one'], multiOneSg); - expect(oneSg).toEqual([ + const multiTwoSg = multi.signals(model, selCmpts['two']); + const twoSg = clear.signals(model, selCmpts['two'], multiTwoSg); + expect(twoSg).toEqual([ { - name: 'one_tuple', + name: 'two_tuple', on: [ { - events: selCmpts['one'].events, + events: selCmpts['two'].events, update: - 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['one'].clear}], update: 'null'} + {events: [{source: 'scope', type: selCmpts['two'].clear}], update: 'null'} ] } ]); - const multiTwoSg = multi.signals(model, selCmpts['two']); - expect(multiTwoSg).toEqual([ + const intervalThreeSg = interval.signals(model, selCmpts['three']); + const threeSg = clear.signals(model, selCmpts['three'], intervalThreeSg); + expect(threeSg).toContainEqual({ + name: 'three_tuple', + on: [ + { + events: [{signal: 'three_Horsepower'}], + update: 'three_Horsepower ? {unit: "", fields: three_tuple_fields, values: [three_Horsepower]} : null' + }, + {events: [{source: 'scope', type: selCmpts['three'].clear}], update: 'null'} + ] + }); + + const singleFourSg = single.signals(model, selCmpts['four']); + const fourSg = clear.signals(model, selCmpts['four'], singleFourSg); + expect(fourSg).toEqual([ { - name: 'two_tuple', + name: 'four_tuple', on: [ { - events: selCmpts['two'].events, + events: selCmpts['four'].events, update: - 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: four_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true - } + }, + {events: [{source: 'scope', type: selCmpts['four'].clear}], update: 'null'} ] } ]); - const twoSg = clear.signals(model, selCmpts['two'], multiTwoSg); - expect(twoSg).toEqual([ + const multiFiveSg = multi.signals(model, selCmpts['five']); + const fiveSg = clear.signals(model, selCmpts['five'], multiFiveSg); + expect(fiveSg).toEqual([ { - name: 'two_tuple', + name: 'five_tuple', on: [ { - events: selCmpts['two'].events, + events: selCmpts['five'].events, update: - 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: five_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['two'].clear}], update: 'null'} + {events: [{source: 'scope', type: selCmpts['five'].clear}], update: 'null'} ] } ]); + const intervalSixSg = interval.signals(model, selCmpts['six']); + const sixSg = clear.signals(model, selCmpts['six'], intervalSixSg); + expect(sixSg).toContainEqual({ + name: 'six_tuple', + on: [ + { + events: [{signal: 'six_Horsepower'}], + update: 'six_Horsepower ? {unit: "", fields: six_tuple_fields, values: [six_Horsepower]} : null' + }, + {events: [{source: 'scope', type: selCmpts['six'].clear}], update: 'null'} + ] + }); + const signals = assembleUnitSelectionSignals(model, []); expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg])); }); diff --git a/test/compile/selection/interval.test.ts b/test/compile/selection/interval.test.ts index e4155ea6ee..ea2d7dcf75 100644 --- a/test/compile/selection/interval.test.ts +++ b/test/compile/selection/interval.test.ts @@ -18,17 +18,19 @@ describe('Interval Selections', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'interval', encodings: ['x'], translate: false, zoom: false}, + one: {type: 'interval', encodings: ['x'], clear: false, translate: false, zoom: false}, two: { type: 'interval', encodings: ['y'], bind: 'scales', + clear: false, translate: false, zoom: false }, 'thr-ee': { type: 'interval', on: '[mousedown, mouseup] > mousemove, [keydown, keyup] > keypress', + clear: false, translate: false, zoom: false, resolve: 'intersect', @@ -44,6 +46,7 @@ describe('Interval Selections', () => { }, four: { type: 'interval', + clear: false, translate: false, zoom: false, encodings: ['x'], @@ -51,12 +54,14 @@ describe('Interval Selections', () => { }, five: { type: 'interval', + clear: false, translate: false, zoom: false, init: {x: [50, 60], y: [23, 54]} }, six: { type: 'interval', + clear: false, translate: false, zoom: false, encodings: ['x'], From 20eba3fab8f1e119eb0b60a35967ccc4b1cddee1 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 15 Mar 2019 20:37:51 +0000 Subject: [PATCH 12/36] [Travis] Update examples (build: 22361) --- examples/compiled/brush_table.vg.json | 4 ++ .../circle_bubble_health_income.vg.json | 3 +- .../compiled/interactive_area_brush.vg.json | 3 +- examples/compiled/interactive_brush.vg.json | 3 +- .../interactive_dashboard_europe_pop.vg.json | 12 ++++ .../interactive_layered_crossfilter.vg.json | 12 ++++ .../interactive_overview_detail.vg.json | 4 ++ .../interactive_paintbrush_interval.vg.json | 3 +- .../interactive_panzoom_splom.vg.json | 36 ++++++++++ ...interactive_panzoom_vconcat_shared.vg.json | 4 ++ .../interactive_seattle_weather.vg.json | 4 ++ examples/compiled/interactive_splom.vg.json | 72 +++++++++++++++++++ examples/compiled/isotype_grid.vg.json | 3 +- .../compiled/selection_brush_timeunit.vg.json | 4 ++ .../selection_composition_and.vg.json | 6 +- .../compiled/selection_composition_or.vg.json | 6 +- examples/compiled/selection_concat.vg.json | 8 +++ examples/compiled/selection_filter.vg.json | 4 ++ .../selection_filter_composition.vg.json | 4 ++ .../selection_interval_mark_style.vg.json | 6 +- .../selection_layer_bar_month.vg.json | 3 +- .../selection_multi_condition.vg.json | 3 +- .../selection_project_binned_interval.vg.json | 3 +- .../selection_project_interval.vg.json | 3 +- .../selection_project_interval_x.vg.json | 3 +- .../selection_project_interval_x_y.vg.json | 3 +- .../selection_project_interval_y.vg.json | 3 +- .../selection_resolution_global.vg.json | 36 ++++++++++ .../selection_resolution_intersect.vg.json | 36 ++++++++++ .../selection_resolution_union.vg.json | 36 ++++++++++ .../selection_translate_brush_drag.vg.json | 3 +- ...lection_translate_brush_shift-drag.vg.json | 3 +- ...lection_translate_scatterplot_drag.vg.json | 3 +- ...n_translate_scatterplot_shift-drag.vg.json | 3 +- .../compiled/selection_type_interval.vg.json | 3 +- .../selection_type_interval_invert.vg.json | 3 +- .../selection_zoom_brush_shift-wheel.vg.json | 3 +- .../selection_zoom_brush_wheel.vg.json | 3 +- ...ction_zoom_scatterplot_shift-wheel.vg.json | 3 +- .../selection_zoom_scatterplot_wheel.vg.json | 3 +- examples/compiled/trellis_selections.vg.json | 8 +++ 41 files changed, 340 insertions(+), 28 deletions(-) diff --git a/examples/compiled/brush_table.vg.json b/examples/compiled/brush_table.vg.json index b474357e3b..569df0072a 100644 --- a/examples/compiled/brush_table.vg.json +++ b/examples/compiled/brush_table.vg.json @@ -211,6 +211,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/circle_bubble_health_income.vg.json b/examples/compiled/circle_bubble_health_income.vg.json index 27a0bcd7e0..7355a50e45 100644 --- a/examples/compiled/circle_bubble_health_income.vg.json +++ b/examples/compiled/circle_bubble_health_income.vg.json @@ -55,7 +55,8 @@ { "events": [{"signal": "view_income || view_health"}], "update": "view_income && view_health ? {unit: \"\", fields: view_tuple_fields, values: [view_income,view_health]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_area_brush.vg.json b/examples/compiled/interactive_area_brush.vg.json index c629fbb114..2317f60d3e 100644 --- a/examples/compiled/interactive_area_brush.vg.json +++ b/examples/compiled/interactive_area_brush.vg.json @@ -133,7 +133,8 @@ { "events": [{"signal": "brush_yearmonth_date"}], "update": "brush_yearmonth_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_yearmonth_date]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_brush.vg.json b/examples/compiled/interactive_brush.vg.json index 8aa2ce2c6a..6abfbdf8dd 100644 --- a/examples/compiled/interactive_brush.vg.json +++ b/examples/compiled/interactive_brush.vg.json @@ -148,7 +148,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_dashboard_europe_pop.vg.json b/examples/compiled/interactive_dashboard_europe_pop.vg.json index a6e54ea83f..a90f170231 100644 --- a/examples/compiled/interactive_dashboard_europe_pop.vg.json +++ b/examples/compiled/interactive_dashboard_europe_pop.vg.json @@ -407,6 +407,10 @@ { "events": [{"signal": "brush_Country"}], "update": "brush_Country ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Country]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -721,6 +725,10 @@ { "events": [{"signal": "brush_Country"}], "update": "brush_Country ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_Country]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1097,6 +1105,10 @@ } ], "update": "brush_Population_ages_65_and_above_of_total && brush_Population_ages_15_64_of_total ? {unit: \"concat_2\", fields: brush_tuple_fields, values: [brush_Population_ages_65_and_above_of_total,brush_Population_ages_15_64_of_total]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter.vg.json b/examples/compiled/interactive_layered_crossfilter.vg.json index 8800194b1a..768a67a8ee 100644 --- a/examples/compiled/interactive_layered_crossfilter.vg.json +++ b/examples/compiled/interactive_layered_crossfilter.vg.json @@ -249,6 +249,10 @@ { "events": [{"signal": "brush_distance"}], "update": "brush_distance ? {unit: \"child__repeat_column_distance_layer_0\", fields: brush_tuple_fields, values: [brush_distance]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -625,6 +629,10 @@ { "events": [{"signal": "brush_delay"}], "update": "brush_delay ? {unit: \"child__repeat_column_delay_layer_0\", fields: brush_tuple_fields, values: [brush_delay]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1001,6 +1009,10 @@ { "events": [{"signal": "brush_time"}], "update": "brush_time ? {unit: \"child__repeat_column_time_layer_0\", fields: brush_tuple_fields, values: [brush_time]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_overview_detail.vg.json b/examples/compiled/interactive_overview_detail.vg.json index e31c5944c1..5b483b008f 100644 --- a/examples/compiled/interactive_overview_detail.vg.json +++ b/examples/compiled/interactive_overview_detail.vg.json @@ -189,6 +189,10 @@ { "events": [{"signal": "brush_date"}], "update": "brush_date ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_date]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_paintbrush_interval.vg.json b/examples/compiled/interactive_paintbrush_interval.vg.json index 9a659843b1..c08b882621 100644 --- a/examples/compiled/interactive_paintbrush_interval.vg.json +++ b/examples/compiled/interactive_paintbrush_interval.vg.json @@ -150,7 +150,8 @@ {"signal": "paintbrush_Horsepower || paintbrush_Miles_per_Gallon"} ], "update": "paintbrush_Horsepower && paintbrush_Miles_per_Gallon ? {unit: \"\", fields: paintbrush_tuple_fields, values: [paintbrush_Horsepower,paintbrush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_panzoom_splom.vg.json b/examples/compiled/interactive_panzoom_splom.vg.json index 179492d33c..d39c03ef04 100644 --- a/examples/compiled/interactive_panzoom_splom.vg.json +++ b/examples/compiled/interactive_panzoom_splom.vg.json @@ -70,6 +70,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Horsepower"} ], "update": "grid_Miles_per_Gallon && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -264,6 +268,10 @@ { "events": [{"signal": "grid_Acceleration || grid_Horsepower"}], "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -444,6 +452,10 @@ { "events": [{"signal": "grid_Horsepower"}], "update": "grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -637,6 +649,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Acceleration"} ], "update": "grid_Miles_per_Gallon && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -817,6 +833,10 @@ { "events": [{"signal": "grid_Acceleration"}], "update": "grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1008,6 +1028,10 @@ { "events": [{"signal": "grid_Horsepower || grid_Acceleration"}], "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1188,6 +1212,10 @@ { "events": [{"signal": "grid_Miles_per_Gallon"}], "update": "grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1381,6 +1409,10 @@ {"signal": "grid_Acceleration || grid_Miles_per_Gallon"} ], "update": "grid_Acceleration && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1577,6 +1609,10 @@ {"signal": "grid_Horsepower || grid_Miles_per_Gallon"} ], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json index 2cd6317923..daba971bde 100644 --- a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json +++ b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json @@ -73,6 +73,10 @@ {"signal": "region_Horsepower || region_Miles_per_Gallon"} ], "update": "region_Horsepower && region_Miles_per_Gallon ? {unit: \"concat_0\", fields: region_tuple_fields, values: [region_Horsepower,region_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index 4c530fbb01..7740384b84 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -152,6 +152,10 @@ { "events": [{"signal": "brush_monthdate_date"}], "update": "brush_monthdate_date ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_monthdate_date]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_splom.vg.json b/examples/compiled/interactive_splom.vg.json index d72caa6c34..f0c26c5518 100644 --- a/examples/compiled/interactive_splom.vg.json +++ b/examples/compiled/interactive_splom.vg.json @@ -178,6 +178,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -305,6 +309,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Horsepower"} ], "update": "grid_Miles_per_Gallon && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -669,6 +677,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -794,6 +806,10 @@ { "events": [{"signal": "grid_Acceleration || grid_Horsepower"}], "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1098,6 +1114,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1206,6 +1226,10 @@ { "events": [{"signal": "grid_Horsepower"}], "update": "grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1566,6 +1590,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1693,6 +1721,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Acceleration"} ], "update": "grid_Miles_per_Gallon && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1997,6 +2029,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2105,6 +2141,10 @@ { "events": [{"signal": "grid_Acceleration"}], "update": "grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2463,6 +2503,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2588,6 +2632,10 @@ { "events": [{"signal": "grid_Horsepower || grid_Acceleration"}], "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2892,6 +2940,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3000,6 +3052,10 @@ { "events": [{"signal": "grid_Miles_per_Gallon"}], "update": "grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3360,6 +3416,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3487,6 +3547,10 @@ {"signal": "grid_Acceleration || grid_Miles_per_Gallon"} ], "update": "grid_Acceleration && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3853,6 +3917,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3980,6 +4048,10 @@ {"signal": "grid_Horsepower || grid_Miles_per_Gallon"} ], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/isotype_grid.vg.json b/examples/compiled/isotype_grid.vg.json index 88c3a949d7..458fb46f74 100644 --- a/examples/compiled/isotype_grid.vg.json +++ b/examples/compiled/isotype_grid.vg.json @@ -250,7 +250,8 @@ { "events": [{"signal": "highlight_col || highlight_row"}], "update": "highlight_col && highlight_row ? {unit: \"\", fields: highlight_tuple_fields, values: [highlight_col,highlight_row]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_brush_timeunit.vg.json b/examples/compiled/selection_brush_timeunit.vg.json index 1a844fc241..a0bd335f3f 100644 --- a/examples/compiled/selection_brush_timeunit.vg.json +++ b/examples/compiled/selection_brush_timeunit.vg.json @@ -139,6 +139,10 @@ { "events": [{"signal": "brush_seconds_date"}], "update": "brush_seconds_date ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_seconds_date]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_composition_and.vg.json b/examples/compiled/selection_composition_and.vg.json index 6b8c531bbc..b666d9e68a 100644 --- a/examples/compiled/selection_composition_and.vg.json +++ b/examples/compiled/selection_composition_and.vg.json @@ -160,7 +160,8 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -370,7 +371,8 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_composition_or.vg.json b/examples/compiled/selection_composition_or.vg.json index 5683eb89bf..3e35670d45 100644 --- a/examples/compiled/selection_composition_or.vg.json +++ b/examples/compiled/selection_composition_or.vg.json @@ -160,7 +160,8 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -370,7 +371,8 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_concat.vg.json b/examples/compiled/selection_concat.vg.json index 75d005c351..63149e289d 100644 --- a/examples/compiled/selection_concat.vg.json +++ b/examples/compiled/selection_concat.vg.json @@ -167,6 +167,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -466,6 +470,10 @@ { "events": [{"signal": "grid_Displacement || grid_Acceleration"}], "update": "grid_Displacement && grid_Acceleration ? {unit: \"concat_1\", fields: grid_tuple_fields, values: [grid_Displacement,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json index 327a57f263..d12d8ff5d1 100644 --- a/examples/compiled/selection_filter.vg.json +++ b/examples/compiled/selection_filter.vg.json @@ -170,6 +170,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json index 761bbd830a..be32a322c0 100644 --- a/examples/compiled/selection_filter_composition.vg.json +++ b/examples/compiled/selection_filter_composition.vg.json @@ -170,6 +170,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_interval_mark_style.vg.json b/examples/compiled/selection_interval_mark_style.vg.json index 2275f6d08b..e239c1bdbe 100644 --- a/examples/compiled/selection_interval_mark_style.vg.json +++ b/examples/compiled/selection_interval_mark_style.vg.json @@ -160,7 +160,8 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -370,7 +371,8 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_layer_bar_month.vg.json b/examples/compiled/selection_layer_bar_month.vg.json index 1e6372e248..44b0029c63 100644 --- a/examples/compiled/selection_layer_bar_month.vg.json +++ b/examples/compiled/selection_layer_bar_month.vg.json @@ -135,7 +135,8 @@ { "events": [{"signal": "brush_month_date"}], "update": "brush_month_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_month_date]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index 4272f4be29..56737531e1 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -155,7 +155,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_binned_interval.vg.json b/examples/compiled/selection_project_binned_interval.vg.json index 8ed68c90a8..4839a3e4c8 100644 --- a/examples/compiled/selection_project_binned_interval.vg.json +++ b/examples/compiled/selection_project_binned_interval.vg.json @@ -147,7 +147,8 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval.vg.json b/examples/compiled/selection_project_interval.vg.json index ed628b5eb0..2dabc0375c 100644 --- a/examples/compiled/selection_project_interval.vg.json +++ b/examples/compiled/selection_project_interval.vg.json @@ -152,7 +152,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_x.vg.json b/examples/compiled/selection_project_interval_x.vg.json index 0188102557..0e26d810a6 100644 --- a/examples/compiled/selection_project_interval_x.vg.json +++ b/examples/compiled/selection_project_interval_x.vg.json @@ -102,7 +102,8 @@ { "events": [{"signal": "pts_Cylinders"}], "update": "pts_Cylinders ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_x_y.vg.json b/examples/compiled/selection_project_interval_x_y.vg.json index ed628b5eb0..2dabc0375c 100644 --- a/examples/compiled/selection_project_interval_x_y.vg.json +++ b/examples/compiled/selection_project_interval_x_y.vg.json @@ -152,7 +152,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_y.vg.json b/examples/compiled/selection_project_interval_y.vg.json index 0f8da2aa20..e81a53b19b 100644 --- a/examples/compiled/selection_project_interval_y.vg.json +++ b/examples/compiled/selection_project_interval_y.vg.json @@ -102,7 +102,8 @@ { "events": [{"signal": "pts_Origin"}], "update": "pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_resolution_global.vg.json b/examples/compiled/selection_resolution_global.vg.json index 355e38760c..3d769b89e4 100644 --- a/examples/compiled/selection_resolution_global.vg.json +++ b/examples/compiled/selection_resolution_global.vg.json @@ -163,6 +163,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -569,6 +573,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -917,6 +925,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1319,6 +1331,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1667,6 +1683,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2067,6 +2087,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2415,6 +2439,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2817,6 +2845,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3225,6 +3257,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_intersect.vg.json b/examples/compiled/selection_resolution_intersect.vg.json index 458ec0df1b..59e048eaa1 100644 --- a/examples/compiled/selection_resolution_intersect.vg.json +++ b/examples/compiled/selection_resolution_intersect.vg.json @@ -166,6 +166,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -524,6 +528,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -824,6 +832,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1178,6 +1190,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1478,6 +1494,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1830,6 +1850,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2130,6 +2154,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2484,6 +2512,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2844,6 +2876,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_union.vg.json b/examples/compiled/selection_resolution_union.vg.json index 72c73ac438..fcbfc56b41 100644 --- a/examples/compiled/selection_resolution_union.vg.json +++ b/examples/compiled/selection_resolution_union.vg.json @@ -166,6 +166,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -524,6 +528,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -824,6 +832,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1178,6 +1190,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1478,6 +1494,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1830,6 +1850,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2130,6 +2154,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2484,6 +2512,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2844,6 +2876,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json index 49f6ea446d..5c0e111c38 100644 --- a/examples/compiled/selection_translate_brush_drag.vg.json +++ b/examples/compiled/selection_translate_brush_drag.vg.json @@ -144,7 +144,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json index 6a176de477..2e559265f1 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.vg.json +++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json @@ -144,7 +144,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_drag.vg.json b/examples/compiled/selection_translate_scatterplot_drag.vg.json index 93698301db..15a30f27fb 100644 --- a/examples/compiled/selection_translate_scatterplot_drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_drag.vg.json @@ -50,7 +50,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json index 5e2b3945dc..901ae21e13 100644 --- a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json @@ -50,7 +50,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_interval.vg.json b/examples/compiled/selection_type_interval.vg.json index ed628b5eb0..2dabc0375c 100644 --- a/examples/compiled/selection_type_interval.vg.json +++ b/examples/compiled/selection_type_interval.vg.json @@ -152,7 +152,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_interval_invert.vg.json b/examples/compiled/selection_type_interval_invert.vg.json index f09dbd5efb..9c5e3cef6b 100644 --- a/examples/compiled/selection_type_interval_invert.vg.json +++ b/examples/compiled/selection_type_interval_invert.vg.json @@ -152,7 +152,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json index 590097c8c1..8758a7701d 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json @@ -144,7 +144,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json index 49f6ea446d..5c0e111c38 100644 --- a/examples/compiled/selection_zoom_brush_wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_wheel.vg.json @@ -144,7 +144,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json index 7c4fbb4925..34c07d034d 100644 --- a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json @@ -50,7 +50,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json index 93698301db..15a30f27fb 100644 --- a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json @@ -50,7 +50,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/trellis_selections.vg.json b/examples/compiled/trellis_selections.vg.json index fe84921e57..aadd95d462 100644 --- a/examples/compiled/trellis_selections.vg.json +++ b/examples/compiled/trellis_selections.vg.json @@ -210,6 +210,10 @@ { "events": [{"signal": "brush_X"}], "update": "brush_X ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: brush_tuple_fields, values: [brush_X]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -329,6 +333,10 @@ { "events": [{"signal": "grid_X || grid_Y"}], "update": "grid_X && grid_Y ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: grid_tuple_fields, values: [grid_X,grid_Y]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, From cd6362a13d04d1a6ca612d997a2f342e4327986b Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Thu, 21 Mar 2019 00:53:47 -0400 Subject: [PATCH 13/36] Clear transform default doubleclick clears selected data and brush, working with all example interactive visualizations --- src/compile/selection/transforms/clear.ts | 24 +++++++++++++++---- .../selection/transforms/transforms.ts | 18 ++++---------- src/selection.ts | 16 ++++++------- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index f1db7e4ebd..8295e4848c 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -1,16 +1,32 @@ import {TUPLE} from '..'; +import {selector as parseSelector} from 'vega-event-selector'; import {TransformCompiler} from './transforms'; +const CLEAR_DATA_SIGNALS = [TUPLE, '_toggle']; +const CLEAR_VISUAL_SIGNALS = ['_x', '_y']; + +const CLEAR_SIGNALS = [CLEAR_DATA_SIGNALS, CLEAR_VISUAL_SIGNALS]; +const CLEAR_UPDATE = ['null', '[0, 0]']; + const clear: TransformCompiler = { has: selCmpt => { return selCmpt.clear; }, signals: (model, selCmpt, signals) => { - const tupleIdx = signals.findIndex(i => i.name === selCmpt.name + TUPLE); - signals[tupleIdx].on.push({ - events: [{source: 'scope', type: selCmpt.clear}], - update: 'null' + let events = parseSelector(selCmpt.clear, 'scope'); + CLEAR_SIGNALS.forEach((signal, k) => { + for (let i = 0; i < signal.length; i++) { + const idx = signals.findIndex(n => n.name === selCmpt.name + signal[i]); + if (idx !== -1) { + signals[idx].on = signals[idx].on + ? signals[idx].on.concat({ + events: events, + update: CLEAR_UPDATE[k] + }) + : [{events: events, update: CLEAR_UPDATE[k]}]; + } + } }); return signals; } diff --git a/src/compile/selection/transforms/transforms.ts b/src/compile/selection/transforms/transforms.ts index ecee169eee..3b2cf2c3b4 100644 --- a/src/compile/selection/transforms/transforms.ts +++ b/src/compile/selection/transforms/transforms.ts @@ -1,7 +1,6 @@ import {NewSignal, Signal} from 'vega'; import {SelectionComponent} from '..'; import {SelectionDef} from '../../../selection'; -import {Dict} from '../../../util'; import {Model} from '../../model'; import {UnitModel} from '../../unit'; import clear from './clear'; @@ -22,21 +21,12 @@ export interface TransformCompiler { marks?: (model: UnitModel, selCmpt: SelectionComponent, marks: any[]) => any[]; } -const compilers: Dict = { - project, - toggle, - scales, - translate, - zoom, - inputs, - nearest, - clear -}; +const compilers: Array = [project, toggle, scales, translate, zoom, inputs, nearest, clear]; export function forEachTransform(selCmpt: SelectionComponent, cb: (tx: TransformCompiler) => void) { - for (const t in compilers) { - if (compilers[t].has(selCmpt)) { - cb(compilers[t]); + for (const t of compilers) { + if (t.has(selCmpt)) { + cb(t); } } } diff --git a/src/selection.ts b/src/selection.ts index a97a7a088d..52af067a1f 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -58,15 +58,14 @@ export interface BaseSelectionDef { export interface SingleSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Can be `true`, `false`, or a `string` that is - * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/). * * __Default value:__ `true`, which corresponds to `dblclick` (i.e. * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string | boolean; + clear?: EventStream | boolean; /** * Establish a two-way binding between a single selection and input elements * (also known as dynamic query widgets). A binding takes the form of @@ -93,15 +92,14 @@ export interface SingleSelectionConfig extends BaseSelectionDef { export interface MultiSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Can be `true`, `false`, or a `string` that is - * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/). * * __Default value:__ `true`, which corresponds to `dblclick` (i.e. * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string | boolean; + clear?: EventStream | boolean; /** * Controls whether data values should be toggled or only ever inserted into @@ -171,15 +169,14 @@ export interface BrushConfig { export interface IntervalSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Can be `true`, `false`, or a `string` that is - * one of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/). * * __Default value:__ `true`, which corresponds to `dblclick` (i.e. * user doubleclick clears current selection). * * See the [TODO: clear] documentation for more information. */ - clear?: string | boolean; + clear?: EventStream | boolean; /** * When truthy, allows a user to interactively move an interval selection * back-and-forth. Can be `true`, `false` (to disable panning), or a @@ -272,6 +269,7 @@ export const defaultConfig: SelectionConfig = { single: { on: 'click', fields: [SELECTION_ID], + clear: 'dblclick', resolve: 'global', empty: 'all' }, From 94027a930aa8d4399acc0d077018e597af125e4c Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Thu, 21 Mar 2019 02:02:08 -0400 Subject: [PATCH 14/36] adding test cases for clear.ts and updating other test files to turn clear off for those tests --- src/compile/selection/transforms/clear.ts | 9 +- .../selection/transforms/transforms.ts | 2 +- test/compile/selection/clear.test.ts | 175 +++++++++++------- test/compile/selection/inputs.test.ts | 6 + test/compile/selection/single.test.ts | 5 +- test/compile/selection/toggle.test.ts | 11 +- 6 files changed, 134 insertions(+), 74 deletions(-) diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index 8295e4848c..a5a033f885 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -1,5 +1,5 @@ -import {TUPLE} from '..'; import {selector as parseSelector} from 'vega-event-selector'; +import {TUPLE} from '..'; import {TransformCompiler} from './transforms'; const CLEAR_DATA_SIGNALS = [TUPLE, '_toggle']; @@ -14,10 +14,11 @@ const clear: TransformCompiler = { }, signals: (model, selCmpt, signals) => { - let events = parseSelector(selCmpt.clear, 'scope'); + const events = parseSelector(selCmpt.clear, 'scope'); + CLEAR_SIGNALS.forEach((signal, k) => { - for (let i = 0; i < signal.length; i++) { - const idx = signals.findIndex(n => n.name === selCmpt.name + signal[i]); + for (const ext of signal) { + const idx = signals.findIndex(n => n.name === selCmpt.name + ext); if (idx !== -1) { signals[idx].on = signals[idx].on ? signals[idx].on.concat({ diff --git a/src/compile/selection/transforms/transforms.ts b/src/compile/selection/transforms/transforms.ts index 3b2cf2c3b4..aedc9d4087 100644 --- a/src/compile/selection/transforms/transforms.ts +++ b/src/compile/selection/transforms/transforms.ts @@ -21,7 +21,7 @@ export interface TransformCompiler { marks?: (model: UnitModel, selCmpt: SelectionComponent, marks: any[]) => any[]; } -const compilers: Array = [project, toggle, scales, translate, zoom, inputs, nearest, clear]; +const compilers: TransformCompiler[] = [project, toggle, scales, translate, zoom, inputs, nearest, clear]; export function forEachTransform(selCmpt: SelectionComponent, cb: (tx: TransformCompiler) => void) { for (const t of compilers) { diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts index 4cc0b3e18a..01dbb1aa60 100644 --- a/test/compile/selection/clear.test.ts +++ b/test/compile/selection/clear.test.ts @@ -1,5 +1,6 @@ /* tslint:disable quotemark */ +import {selector as parseSelector} from 'vega-event-selector'; import {assembleUnitSelectionSignals} from '../../../src/compile/selection/assemble'; import interval from '../../../src/compile/selection/interval'; import multi from '../../../src/compile/selection/multi'; @@ -8,7 +9,7 @@ import single from '../../../src/compile/selection/single'; import clear from '../../../src/compile/selection/transforms/clear'; import {parseUnitModel} from '../../util'; -describe('Clear Selection Transform', () => { +describe('Clear selection transform, single and multi types', () => { const model = parseUnitModel({ mark: 'circle', encoding: { @@ -20,18 +21,12 @@ describe('Clear Selection Transform', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'single', clear: true}, + one: {type: 'single'}, two: {type: 'multi'}, - three: {type: 'interval', encodings: ['x']}, - four: {type: 'single', clear: 'mouseout'}, - five: {type: 'multi', clear: 'mouseout'}, - six: {type: 'interval', encodings: ['x'], clear: 'mouseout'}, - seven: {type: 'single'}, - eight: {type: 'multi', clear: false}, - nine: {type: 'interval', encodings: ['x'], clear: false}, - ten: {type: 'single', clear: null}, - eleven: {type: 'multi', clear: null}, - twelve: {type: 'interval', encodings: ['x'], clear: null} + three: {type: 'single', clear: 'mouseout'}, + four: {type: 'multi', clear: 'mouseout'}, + five: {type: 'single', clear: false}, + six: {type: 'multi', clear: false} })); it('identifies transform invocation', () => { @@ -39,17 +34,11 @@ describe('Clear Selection Transform', () => { expect(clear.has(selCmpts['two'])).toBeTruthy(); expect(clear.has(selCmpts['three'])).toBeTruthy(); expect(clear.has(selCmpts['four'])).toBeTruthy(); - expect(clear.has(selCmpts['five'])).toBeTruthy(); - expect(clear.has(selCmpts['six'])).toBeTruthy(); - expect(clear.has(selCmpts['seven'])).toBeFalsy(); - expect(clear.has(selCmpts['eight'])).toBeFalsy(); - expect(clear.has(selCmpts['nine'])).toBeFalsy(); - expect(clear.has(selCmpts['ten'])).toBeFalsy(); - expect(clear.has(selCmpts['eleven'])).toBeFalsy(); - expect(clear.has(selCmpts['twelve'])).toBeFalsy(); + expect(clear.has(selCmpts['five'])).toBeFalsy(); + expect(clear.has(selCmpts['six'])).toBeFalsy(); }); - it('builds clear signals', () => { + it('appends clear transform', () => { const singleOneSg = single.signals(model, selCmpts['one']); const oneSg = clear.signals(model, selCmpts['one'], singleOneSg); expect(oneSg).toEqual([ @@ -62,7 +51,7 @@ describe('Clear Selection Transform', () => { 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['one'].clear}], update: 'null'} + {events: parseSelector(selCmpts['one'].clear, 'scope'), update: 'null'} ] } ]); @@ -79,72 +68,132 @@ describe('Clear Selection Transform', () => { 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['two'].clear}], update: 'null'} + {events: parseSelector(selCmpts['two'].clear, 'scope'), update: 'null'} ] } ]); - const intervalThreeSg = interval.signals(model, selCmpts['three']); - const threeSg = clear.signals(model, selCmpts['three'], intervalThreeSg); - expect(threeSg).toContainEqual({ - name: 'three_tuple', - on: [ - { - events: [{signal: 'three_Horsepower'}], - update: 'three_Horsepower ? {unit: "", fields: three_tuple_fields, values: [three_Horsepower]} : null' - }, - {events: [{source: 'scope', type: selCmpts['three'].clear}], update: 'null'} - ] - }); - - const singleFourSg = single.signals(model, selCmpts['four']); - const fourSg = clear.signals(model, selCmpts['four'], singleFourSg); - expect(fourSg).toEqual([ + const singleThreeSg = single.signals(model, selCmpts['three']); + const threeSg = clear.signals(model, selCmpts['three'], singleThreeSg); + expect(threeSg).toEqual([ { - name: 'four_tuple', + name: 'three_tuple', on: [ { - events: selCmpts['four'].events, + events: selCmpts['three'].events, update: - 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: four_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: three_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['four'].clear}], update: 'null'} + {events: parseSelector(selCmpts['three'].clear, 'scope'), update: 'null'} ] } ]); - const multiFiveSg = multi.signals(model, selCmpts['five']); - const fiveSg = clear.signals(model, selCmpts['five'], multiFiveSg); - expect(fiveSg).toEqual([ + const multiFourSg = multi.signals(model, selCmpts['four']); + const fourSg = clear.signals(model, selCmpts['four'], multiFourSg); + expect(fourSg).toEqual([ { - name: 'five_tuple', + name: 'four_tuple', on: [ { - events: selCmpts['five'].events, + events: selCmpts['four'].events, update: - 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: five_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', + 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: four_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: [{source: 'scope', type: selCmpts['five'].clear}], update: 'null'} + {events: parseSelector(selCmpts['four'].clear, 'scope'), update: 'null'} ] } ]); - const intervalSixSg = interval.signals(model, selCmpts['six']); - const sixSg = clear.signals(model, selCmpts['six'], intervalSixSg); - expect(sixSg).toContainEqual({ - name: 'six_tuple', - on: [ - { - events: [{signal: 'six_Horsepower'}], - update: 'six_Horsepower ? {unit: "", fields: six_tuple_fields, values: [six_Horsepower]} : null' - }, - {events: [{source: 'scope', type: selCmpts['six'].clear}], update: 'null'} - ] - }); - const signals = assembleUnitSelectionSignals(model, []); expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg])); }); }); + +describe('Clear selection transform, interval type', () => { + const model = parseUnitModel({ + mark: 'point', + encoding: { + x: {field: 'Horsepower', type: 'quantitative'}, + y: {field: 'Miles_per_Gallon', type: 'quantitative'}, + color: {field: 'Origin', type: 'nominal'} + } + }); + + model.parseScale(); + const selCmpts = (model.component.selection = parseUnitSelection(model, { + one: {type: 'interval', encodings: ['x', 'y'], translate: false, zoom: false}, + two: {type: 'interval', encodings: ['x', 'y'], clear: false, translate: false, zoom: false} + })); + + it('identifies transform invocation', () => { + expect(clear.has(selCmpts['one'])).toBeTruthy(); + expect(clear.has(selCmpts['two'])).toBeFalsy(); + }); + + it('appends clear transform', () => { + const intervalOneSg = interval.signals(model, selCmpts['one']); + const oneSg = clear.signals(model, selCmpts['one'], intervalOneSg); + expect(oneSg).toEqual( + expect.arrayContaining([ + { + name: 'one_x', + value: [], + on: [ + { + events: parseSelector('mousedown', 'scope')[0], + update: '[x(unit), x(unit)]' + }, + { + events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0], + update: '[one_x[0], clamp(x(unit), 0, width)]' + }, + { + events: {signal: 'one_scale_trigger'}, + update: '[scale("x", one_Horsepower[0]), scale("x", one_Horsepower[1])]' + }, + { + events: parseSelector(selCmpts['one'].clear, 'scope'), + update: '[0, 0]' + } + ] + }, + { + name: 'one_y', + value: [], + on: [ + { + events: parseSelector('mousedown', 'scope')[0], + update: '[y(unit), y(unit)]' + }, + { + events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0], + update: '[one_y[0], clamp(y(unit), 0, height)]' + }, + { + events: {signal: 'one_scale_trigger'}, + update: '[scale("y", one_Miles_per_Gallon[0]), scale("y", one_Miles_per_Gallon[1])]' + }, + { + events: parseSelector(selCmpts['one'].clear, 'scope'), + update: '[0, 0]' + } + ] + }, + { + name: 'one_tuple', + on: [ + { + events: [{signal: 'one_Horsepower || one_Miles_per_Gallon'}], + update: + 'one_Horsepower && one_Miles_per_Gallon ? {unit: "", fields: one_tuple_fields, values: [one_Horsepower,one_Miles_per_Gallon]} : null' + }, + {events: parseSelector(selCmpts['one'].clear, 'scope'), update: 'null'} + ] + } + ]) + ); + }); +}); diff --git a/test/compile/selection/inputs.test.ts b/test/compile/selection/inputs.test.ts index 90651f47f8..b782a8afd1 100644 --- a/test/compile/selection/inputs.test.ts +++ b/test/compile/selection/inputs.test.ts @@ -19,15 +19,18 @@ describe('Inputs Selection Transform', () => { const selCmpts = parseUnitSelection(model, { one: { type: 'single', + clear: false, bind: {input: 'range', min: 0, max: 10, step: 1} }, two: { type: 'single', + clear: false, fields: ['Cylinders', 'Horsepower'], bind: {input: 'range', min: 0, max: 10, step: 1} }, three: { type: 'single', + clear: false, nearest: true, fields: ['Cylinders', 'Origin'], bind: { @@ -37,14 +40,17 @@ describe('Inputs Selection Transform', () => { }, four: { type: 'single', + clear: false, bind: null }, six: { type: 'interval', + clear: false, bind: 'scales' }, seven: { type: 'single', + clear: false, fields: ['Year'], bind: { Year: {input: 'range', min: 1970, max: 1980, step: 1} diff --git a/test/compile/selection/single.test.ts b/test/compile/selection/single.test.ts index 66e0317ad6..c5e62f9cf3 100644 --- a/test/compile/selection/single.test.ts +++ b/test/compile/selection/single.test.ts @@ -22,9 +22,10 @@ describe('Single Selection', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'single'}, + one: {type: 'single', clear: false}, two: { type: 'single', + clear: false, nearest: true, on: 'mouseover', encodings: ['y', 'color'], @@ -32,11 +33,13 @@ describe('Single Selection', () => { }, 'thr-ee': { type: 'single', + clear: false, fields: ['Horsepower'], init: {Horsepower: 50} }, four: { type: 'single', + clear: false, encodings: ['x', 'color'], init: {x: 50, Origin: 'Japan'} } diff --git a/test/compile/selection/toggle.test.ts b/test/compile/selection/toggle.test.ts index 0f3b83cf1c..d3c28d47f9 100644 --- a/test/compile/selection/toggle.test.ts +++ b/test/compile/selection/toggle.test.ts @@ -17,18 +17,19 @@ describe('Toggle Selection Transform', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'multi'}, + one: {type: 'multi', clear: false}, two: { type: 'multi', resolve: 'union', on: 'mouseover', + clear: false, toggle: 'event.ctrlKey', encodings: ['y', 'color'] }, - three: {type: 'multi', toggle: false}, - four: {type: 'multi', toggle: null}, - five: {type: 'single'}, - six: {type: 'interval'} + three: {type: 'multi', clear: false, toggle: false}, + four: {type: 'multi', clear: false, toggle: null}, + five: {type: 'single', clear: false}, + six: {type: 'interval', clear: false} })); it('identifies transform invocation', () => { From cb15c081a98a39e6692711d22f8a6f63b2d7b266 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Thu, 21 Mar 2019 06:14:21 +0000 Subject: [PATCH 15/36] [Travis] Update schema (build: 22402) --- build/vega-lite-schema.json | 84 ++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 30 deletions(-) diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index b5220c384e..e6b656b7bf 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -6484,11 +6484,15 @@ "type": "string" }, "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -6565,11 +6569,15 @@ "type": "string" }, "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -8509,11 +8517,15 @@ "additionalProperties": false, "properties": { "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -8586,11 +8598,15 @@ "additionalProperties": false, "properties": { "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -10426,11 +10442,15 @@ "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information." }, "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -10500,11 +10520,15 @@ "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information." }, "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", From 2e8b2b5bc0f8f4587298356fffd694535b8e123d Mon Sep 17 00:00:00 2001 From: Travis CI Date: Thu, 21 Mar 2019 06:17:49 +0000 Subject: [PATCH 16/36] [Travis] Update examples (build: 22402) --- examples/compiled/brush_table.vg.json | 8 +++ .../compiled/concat_bar_layer_circle.vg.json | 4 ++ .../compiled/interactive_area_brush.vg.json | 4 ++ .../interactive_bar_select_highlight.vg.json | 6 +- examples/compiled/interactive_brush.vg.json | 8 +++ .../compiled/interactive_concat_layer.vg.json | 4 ++ .../interactive_dashboard_europe_pop.vg.json | 16 +++++ .../interactive_layered_crossfilter.vg.json | 12 ++++ ...ctive_layered_crossfilter_discrete.vg.json | 12 ++++ .../interactive_multi_line_label.vg.json | 3 +- .../interactive_multi_line_tooltip.vg.json | 3 +- .../interactive_overview_detail.vg.json | 4 ++ .../compiled/interactive_paintbrush.vg.json | 3 +- .../interactive_paintbrush_color.vg.json | 3 +- ...teractive_paintbrush_color_nearest.vg.json | 3 +- .../interactive_paintbrush_interval.vg.json | 8 +++ .../interactive_paintbrush_simple_all.vg.json | 3 +- ...interactive_paintbrush_simple_none.vg.json | 3 +- .../interactive_query_widgets.vg.json | 5 +- .../interactive_seattle_weather.vg.json | 8 +++ examples/compiled/interactive_splom.vg.json | 60 +++++++++++++++++++ .../interactive_stocks_nearest_index.vg.json | 3 +- examples/compiled/isotype_grid.vg.json | 8 +++ .../compiled/selection_bind_cylyr.vg.json | 5 +- .../compiled/selection_bind_origin.vg.json | 5 +- .../compiled/selection_brush_timeunit.vg.json | 4 ++ .../selection_composition_and.vg.json | 16 +++++ .../compiled/selection_composition_or.vg.json | 16 +++++ examples/compiled/selection_concat.vg.json | 8 +++ examples/compiled/selection_filter.vg.json | 8 +++ .../selection_filter_composition.vg.json | 8 +++ .../selection_interval_mark_style.vg.json | 16 +++++ .../selection_layer_bar_month.vg.json | 4 ++ .../selection_multi_condition.vg.json | 11 +++- .../selection_project_binned_interval.vg.json | 4 ++ .../selection_project_interval.vg.json | 8 +++ .../selection_project_interval_x.vg.json | 4 ++ .../selection_project_interval_x_y.vg.json | 8 +++ .../selection_project_interval_y.vg.json | 4 ++ .../compiled/selection_project_multi.vg.json | 3 +- .../selection_project_multi_cylinders.vg.json | 3 +- ...ion_project_multi_cylinders_origin.vg.json | 3 +- .../selection_project_multi_origin.vg.json | 3 +- .../compiled/selection_project_single.vg.json | 3 +- ...selection_project_single_cylinders.vg.json | 3 +- ...on_project_single_cylinders_origin.vg.json | 3 +- .../selection_project_single_origin.vg.json | 3 +- .../selection_resolution_global.vg.json | 60 +++++++++++++++++++ .../selection_resolution_intersect.vg.json | 60 +++++++++++++++++++ .../selection_resolution_union.vg.json | 60 +++++++++++++++++++ .../compiled/selection_toggle_altKey.vg.json | 3 +- .../selection_toggle_altKey_shiftKey.vg.json | 3 +- .../selection_toggle_shiftKey.vg.json | 3 +- .../selection_translate_brush_drag.vg.json | 8 +++ ...lection_translate_brush_shift-drag.vg.json | 8 +++ .../compiled/selection_type_interval.vg.json | 8 +++ .../selection_type_interval_invert.vg.json | 8 +++ .../compiled/selection_type_multi.vg.json | 3 +- .../compiled/selection_type_single.vg.json | 3 +- .../selection_type_single_dblclick.vg.json | 3 +- .../selection_zoom_brush_shift-wheel.vg.json | 8 +++ .../selection_zoom_brush_wheel.vg.json | 8 +++ examples/compiled/trellis_selections.vg.json | 12 +++- examples/compiled/vconcat_flatten.vg.json | 4 ++ 64 files changed, 577 insertions(+), 29 deletions(-) diff --git a/examples/compiled/brush_table.vg.json b/examples/compiled/brush_table.vg.json index 569df0072a..d053f3f6bd 100644 --- a/examples/compiled/brush_table.vg.json +++ b/examples/compiled/brush_table.vg.json @@ -126,6 +126,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, concat_0_width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -181,6 +185,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/concat_bar_layer_circle.vg.json b/examples/compiled/concat_bar_layer_circle.vg.json index 21fc153074..5410213f54 100644 --- a/examples/compiled/concat_bar_layer_circle.vg.json +++ b/examples/compiled/concat_bar_layer_circle.vg.json @@ -284,6 +284,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Major_Genre\"]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_area_brush.vg.json b/examples/compiled/interactive_area_brush.vg.json index 2317f60d3e..e59a8aac09 100644 --- a/examples/compiled/interactive_area_brush.vg.json +++ b/examples/compiled/interactive_area_brush.vg.json @@ -105,6 +105,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/interactive_bar_select_highlight.vg.json b/examples/compiled/interactive_bar_select_highlight.vg.json index 8ca84a8422..20de91d8df 100644 --- a/examples/compiled/interactive_bar_select_highlight.vg.json +++ b/examples/compiled/interactive_bar_select_highlight.vg.json @@ -50,7 +50,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: highlight_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -83,7 +84,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_brush.vg.json b/examples/compiled/interactive_brush.vg.json index 6abfbdf8dd..e572d77313 100644 --- a/examples/compiled/interactive_brush.vg.json +++ b/examples/compiled/interactive_brush.vg.json @@ -62,6 +62,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -118,6 +122,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/interactive_concat_layer.vg.json b/examples/compiled/interactive_concat_layer.vg.json index 6417cb1923..3aa479b046 100644 --- a/examples/compiled/interactive_concat_layer.vg.json +++ b/examples/compiled/interactive_concat_layer.vg.json @@ -296,6 +296,10 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Major_Genre\"]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_dashboard_europe_pop.vg.json b/examples/compiled/interactive_dashboard_europe_pop.vg.json index a90f170231..ed4062e9ca 100644 --- a/examples/compiled/interactive_dashboard_europe_pop.vg.json +++ b/examples/compiled/interactive_dashboard_europe_pop.vg.json @@ -379,6 +379,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -697,6 +701,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_1_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1018,6 +1026,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, concat_2_width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1073,6 +1085,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_2_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter.vg.json b/examples/compiled/interactive_layered_crossfilter.vg.json index 768a67a8ee..5ea5b86c99 100644 --- a/examples/compiled/interactive_layered_crossfilter.vg.json +++ b/examples/compiled/interactive_layered_crossfilter.vg.json @@ -221,6 +221,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -601,6 +605,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -981,6 +989,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json index 9431904dc9..47cf100a4a 100644 --- a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json +++ b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json @@ -203,6 +203,10 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -373,6 +377,10 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -543,6 +551,10 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_multi_line_label.vg.json b/examples/compiled/interactive_multi_line_label.vg.json index 8bbc9a2d99..bc547e29db 100644 --- a/examples/compiled/interactive_multi_line_label.vg.json +++ b/examples/compiled/interactive_multi_line_label.vg.json @@ -36,7 +36,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"layer_0_layer_1\", fields: label_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"date\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_multi_line_tooltip.vg.json b/examples/compiled/interactive_multi_line_tooltip.vg.json index c4b9d639a2..5b441d1a48 100644 --- a/examples/compiled/interactive_multi_line_tooltip.vg.json +++ b/examples/compiled/interactive_multi_line_tooltip.vg.json @@ -53,7 +53,8 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"layer_2\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_overview_detail.vg.json b/examples/compiled/interactive_overview_detail.vg.json index 5b483b008f..f584679d17 100644 --- a/examples/compiled/interactive_overview_detail.vg.json +++ b/examples/compiled/interactive_overview_detail.vg.json @@ -161,6 +161,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/interactive_paintbrush.vg.json b/examples/compiled/interactive_paintbrush.vg.json index 50ae712753..be84838948 100644 --- a/examples/compiled/interactive_paintbrush.vg.json +++ b/examples/compiled/interactive_paintbrush.vg.json @@ -49,7 +49,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_color.vg.json b/examples/compiled/interactive_paintbrush_color.vg.json index 36e7cfe319..dc79264be4 100644 --- a/examples/compiled/interactive_paintbrush_color.vg.json +++ b/examples/compiled/interactive_paintbrush_color.vg.json @@ -49,7 +49,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_color_nearest.vg.json b/examples/compiled/interactive_paintbrush_color_nearest.vg.json index 769d7b6838..5442a4d3c4 100644 --- a/examples/compiled/interactive_paintbrush_color_nearest.vg.json +++ b/examples/compiled/interactive_paintbrush_color_nearest.vg.json @@ -49,7 +49,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_interval.vg.json b/examples/compiled/interactive_paintbrush_interval.vg.json index c08b882621..e8cbfba030 100644 --- a/examples/compiled/interactive_paintbrush_interval.vg.json +++ b/examples/compiled/interactive_paintbrush_interval.vg.json @@ -65,6 +65,10 @@ { "events": {"signal": "paintbrush_zoom_delta"}, "update": "clampRange(zoomLinear(paintbrush_x, paintbrush_zoom_anchor.x, paintbrush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -120,6 +124,10 @@ { "events": {"signal": "paintbrush_zoom_delta"}, "update": "clampRange(zoomLinear(paintbrush_y, paintbrush_zoom_anchor.y, paintbrush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/interactive_paintbrush_simple_all.vg.json b/examples/compiled/interactive_paintbrush_simple_all.vg.json index c846449144..dc0c4e82bf 100644 --- a/examples/compiled/interactive_paintbrush_simple_all.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_all.vg.json @@ -48,7 +48,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_none.vg.json b/examples/compiled/interactive_paintbrush_simple_none.vg.json index 0f790a3545..1a0a8bee5b 100644 --- a/examples/compiled/interactive_paintbrush_simple_none.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_none.vg.json @@ -48,7 +48,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_query_widgets.vg.json b/examples/compiled/interactive_query_widgets.vg.json index c7c7dae74c..027dacd7a3 100644 --- a/examples/compiled/interactive_query_widgets.vg.json +++ b/examples/compiled/interactive_query_widgets.vg.json @@ -60,7 +60,10 @@ {"name": "CylYr", "update": "vlSelectionResolve(\"CylYr_store\")"}, { "name": "CylYr_tuple", - "update": "CylYr_Cylinders !== null && CylYr_Year !== null ? {fields: CylYr_tuple_fields, values: [CylYr_Cylinders, CylYr_Year]} : null" + "update": "CylYr_Cylinders !== null && CylYr_Year !== null ? {fields: CylYr_tuple_fields, values: [CylYr_Cylinders, CylYr_Year]} : null", + "on": [ + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + ] }, { "name": "CylYr_init", diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index 7740384b84..f7afef30fa 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -124,6 +124,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -451,6 +455,10 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_splom.vg.json b/examples/compiled/interactive_splom.vg.json index f0c26c5518..3e244e30f4 100644 --- a/examples/compiled/interactive_splom.vg.json +++ b/examples/compiled/interactive_splom.vg.json @@ -84,6 +84,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -141,6 +145,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -585,6 +593,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -642,6 +654,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1082,6 +1098,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1496,6 +1516,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1553,6 +1577,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1997,6 +2025,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2411,6 +2443,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2468,6 +2504,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2908,6 +2948,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3322,6 +3366,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3379,6 +3427,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3823,6 +3875,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3880,6 +3936,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/interactive_stocks_nearest_index.vg.json b/examples/compiled/interactive_stocks_nearest_index.vg.json index b37bad2bde..722fdeebfd 100644 --- a/examples/compiled/interactive_stocks_nearest_index.vg.json +++ b/examples/compiled/interactive_stocks_nearest_index.vg.json @@ -39,7 +39,8 @@ "events": [{"source": "scope", "type": "mousemove"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"layer_1\", fields: index_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"date\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/isotype_grid.vg.json b/examples/compiled/isotype_grid.vg.json index 458fb46f74..7695dc731b 100644 --- a/examples/compiled/isotype_grid.vg.json +++ b/examples/compiled/isotype_grid.vg.json @@ -170,6 +170,10 @@ { "events": {"signal": "highlight_zoom_delta"}, "update": "clampRange(zoomLinear(highlight_x, highlight_zoom_anchor.x, highlight_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -222,6 +226,10 @@ { "events": {"signal": "highlight_zoom_delta"}, "update": "clampRange(zoomLinear(highlight_y, highlight_zoom_anchor.y, highlight_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_bind_cylyr.vg.json b/examples/compiled/selection_bind_cylyr.vg.json index b1d2f84f6c..d2afa4d91d 100644 --- a/examples/compiled/selection_bind_cylyr.vg.json +++ b/examples/compiled/selection_bind_cylyr.vg.json @@ -49,7 +49,10 @@ {"name": "CylYr", "update": "vlSelectionResolve(\"CylYr_store\")"}, { "name": "CylYr_tuple", - "update": "CylYr_Cylinders !== null && CylYr_Year !== null ? {fields: CylYr_tuple_fields, values: [CylYr_Cylinders, CylYr_Year]} : null" + "update": "CylYr_Cylinders !== null && CylYr_Year !== null ? {fields: CylYr_tuple_fields, values: [CylYr_Cylinders, CylYr_Year]} : null", + "on": [ + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + ] }, { "name": "CylYr_tuple_fields", diff --git a/examples/compiled/selection_bind_origin.vg.json b/examples/compiled/selection_bind_origin.vg.json index 346688be8a..3773c8bfea 100644 --- a/examples/compiled/selection_bind_origin.vg.json +++ b/examples/compiled/selection_bind_origin.vg.json @@ -31,7 +31,10 @@ {"name": "org", "update": "vlSelectionResolve(\"org_store\")"}, { "name": "org_tuple", - "update": "org_Origin !== null ? {fields: org_tuple_fields, values: [org_Origin]} : null" + "update": "org_Origin !== null ? {fields: org_tuple_fields, values: [org_Origin]} : null", + "on": [ + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + ] }, {"name": "org_tuple_fields", "value": [{"type": "E", "field": "Origin"}]}, {"name": "org_modify", "update": "modify(\"org_store\", org_tuple, true)"} diff --git a/examples/compiled/selection_brush_timeunit.vg.json b/examples/compiled/selection_brush_timeunit.vg.json index a0bd335f3f..d4321e86a4 100644 --- a/examples/compiled/selection_brush_timeunit.vg.json +++ b/examples/compiled/selection_brush_timeunit.vg.json @@ -111,6 +111,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, concat_0_width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_composition_and.vg.json b/examples/compiled/selection_composition_and.vg.json index b666d9e68a..4a40a2c0c7 100644 --- a/examples/compiled/selection_composition_and.vg.json +++ b/examples/compiled/selection_composition_and.vg.json @@ -79,6 +79,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_x, alex_zoom_anchor.x, alex_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -132,6 +136,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_y, alex_zoom_anchor.y, alex_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -290,6 +298,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_x, morgan_zoom_anchor.x, morgan_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -343,6 +355,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_y, morgan_zoom_anchor.y, morgan_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_composition_or.vg.json b/examples/compiled/selection_composition_or.vg.json index 3e35670d45..d09d4f677b 100644 --- a/examples/compiled/selection_composition_or.vg.json +++ b/examples/compiled/selection_composition_or.vg.json @@ -79,6 +79,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_x, alex_zoom_anchor.x, alex_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -132,6 +136,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_y, alex_zoom_anchor.y, alex_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -290,6 +298,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_x, morgan_zoom_anchor.x, morgan_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -343,6 +355,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_y, morgan_zoom_anchor.y, morgan_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_concat.vg.json b/examples/compiled/selection_concat.vg.json index 63149e289d..2c969fedf0 100644 --- a/examples/compiled/selection_concat.vg.json +++ b/examples/compiled/selection_concat.vg.json @@ -82,6 +82,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -137,6 +141,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json index d12d8ff5d1..25f7e29e95 100644 --- a/examples/compiled/selection_filter.vg.json +++ b/examples/compiled/selection_filter.vg.json @@ -85,6 +85,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -140,6 +144,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json index be32a322c0..edafe00a0a 100644 --- a/examples/compiled/selection_filter_composition.vg.json +++ b/examples/compiled/selection_filter_composition.vg.json @@ -85,6 +85,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -140,6 +144,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_interval_mark_style.vg.json b/examples/compiled/selection_interval_mark_style.vg.json index e239c1bdbe..0729c647f7 100644 --- a/examples/compiled/selection_interval_mark_style.vg.json +++ b/examples/compiled/selection_interval_mark_style.vg.json @@ -79,6 +79,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_x, alex_zoom_anchor.x, alex_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -132,6 +136,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_y, alex_zoom_anchor.y, alex_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -290,6 +298,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_x, morgan_zoom_anchor.x, morgan_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -343,6 +355,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_y, morgan_zoom_anchor.y, morgan_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_layer_bar_month.vg.json b/examples/compiled/selection_layer_bar_month.vg.json index 44b0029c63..d2aaa15446 100644 --- a/examples/compiled/selection_layer_bar_month.vg.json +++ b/examples/compiled/selection_layer_bar_month.vg.json @@ -107,6 +107,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index 56737531e1..6e103d50ac 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -72,6 +72,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -127,6 +131,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -261,7 +269,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_binned_interval.vg.json b/examples/compiled/selection_project_binned_interval.vg.json index 4839a3e4c8..a830a54945 100644 --- a/examples/compiled/selection_project_binned_interval.vg.json +++ b/examples/compiled/selection_project_binned_interval.vg.json @@ -119,6 +119,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_project_interval.vg.json b/examples/compiled/selection_project_interval.vg.json index 2dabc0375c..fd107fde2c 100644 --- a/examples/compiled/selection_project_interval.vg.json +++ b/examples/compiled/selection_project_interval.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -124,6 +128,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_project_interval_x.vg.json b/examples/compiled/selection_project_interval_x.vg.json index 0e26d810a6..302597dd2d 100644 --- a/examples/compiled/selection_project_interval_x.vg.json +++ b/examples/compiled/selection_project_interval_x.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_project_interval_x_y.vg.json b/examples/compiled/selection_project_interval_x_y.vg.json index 2dabc0375c..fd107fde2c 100644 --- a/examples/compiled/selection_project_interval_x_y.vg.json +++ b/examples/compiled/selection_project_interval_x_y.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -124,6 +128,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_project_interval_y.vg.json b/examples/compiled/selection_project_interval_y.vg.json index e81a53b19b..4015217371 100644 --- a/examples/compiled/selection_project_interval_y.vg.json +++ b/examples/compiled/selection_project_interval_y.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_project_multi.vg.json b/examples/compiled/selection_project_multi.vg.json index 10dfb4cdf6..fba9f9a314 100644 --- a/examples/compiled/selection_project_multi.vg.json +++ b/examples/compiled/selection_project_multi.vg.json @@ -42,7 +42,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_multi_cylinders.vg.json b/examples/compiled/selection_project_multi_cylinders.vg.json index b592f6e42f..6f81a1af4a 100644 --- a/examples/compiled/selection_project_multi_cylinders.vg.json +++ b/examples/compiled/selection_project_multi_cylinders.vg.json @@ -40,7 +40,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_multi_cylinders_origin.vg.json b/examples/compiled/selection_project_multi_cylinders_origin.vg.json index bec3a7438b..ca61cc6939 100644 --- a/examples/compiled/selection_project_multi_cylinders_origin.vg.json +++ b/examples/compiled/selection_project_multi_cylinders_origin.vg.json @@ -43,7 +43,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_multi_origin.vg.json b/examples/compiled/selection_project_multi_origin.vg.json index 7c63396154..80af6ef4da 100644 --- a/examples/compiled/selection_project_multi_origin.vg.json +++ b/examples/compiled/selection_project_multi_origin.vg.json @@ -37,7 +37,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_single.vg.json b/examples/compiled/selection_project_single.vg.json index f16b130097..710f890bc8 100644 --- a/examples/compiled/selection_project_single.vg.json +++ b/examples/compiled/selection_project_single.vg.json @@ -30,7 +30,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, diff --git a/examples/compiled/selection_project_single_cylinders.vg.json b/examples/compiled/selection_project_single_cylinders.vg.json index e8d59ca934..5659e23f1c 100644 --- a/examples/compiled/selection_project_single_cylinders.vg.json +++ b/examples/compiled/selection_project_single_cylinders.vg.json @@ -25,7 +25,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Cylinders\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_single_cylinders_origin.vg.json b/examples/compiled/selection_project_single_cylinders_origin.vg.json index 22be4493cc..f40be7b509 100644 --- a/examples/compiled/selection_project_single_cylinders_origin.vg.json +++ b/examples/compiled/selection_project_single_cylinders_origin.vg.json @@ -25,7 +25,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Cylinders\"], (item().isVoronoi ? datum.datum : datum)[\"Origin\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_single_origin.vg.json b/examples/compiled/selection_project_single_origin.vg.json index 74f2b71975..ea2151f7e5 100644 --- a/examples/compiled/selection_project_single_origin.vg.json +++ b/examples/compiled/selection_project_single_origin.vg.json @@ -25,7 +25,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"Origin\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "Origin"}]}, diff --git a/examples/compiled/selection_resolution_global.vg.json b/examples/compiled/selection_resolution_global.vg.json index 3d769b89e4..fa349c43d7 100644 --- a/examples/compiled/selection_resolution_global.vg.json +++ b/examples/compiled/selection_resolution_global.vg.json @@ -71,6 +71,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -126,6 +130,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -483,6 +491,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -538,6 +550,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -893,6 +909,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1239,6 +1259,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1294,6 +1318,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1651,6 +1679,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1997,6 +2029,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2052,6 +2088,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2407,6 +2447,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2753,6 +2797,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2808,6 +2856,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3165,6 +3217,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3220,6 +3276,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_resolution_intersect.vg.json b/examples/compiled/selection_resolution_intersect.vg.json index 59e048eaa1..1fd01b7223 100644 --- a/examples/compiled/selection_resolution_intersect.vg.json +++ b/examples/compiled/selection_resolution_intersect.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -129,6 +133,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -438,6 +446,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -493,6 +505,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -800,6 +816,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1098,6 +1118,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1153,6 +1177,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1462,6 +1490,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1760,6 +1792,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1815,6 +1851,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2122,6 +2162,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2420,6 +2464,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2475,6 +2523,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2784,6 +2836,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2839,6 +2895,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_resolution_union.vg.json b/examples/compiled/selection_resolution_union.vg.json index fcbfc56b41..bdca9ececa 100644 --- a/examples/compiled/selection_resolution_union.vg.json +++ b/examples/compiled/selection_resolution_union.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -129,6 +133,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -438,6 +446,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -493,6 +505,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -800,6 +816,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1098,6 +1118,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1153,6 +1177,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1462,6 +1490,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1760,6 +1792,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1815,6 +1851,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2122,6 +2162,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2420,6 +2464,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2475,6 +2523,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2784,6 +2836,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2839,6 +2895,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_toggle_altKey.vg.json b/examples/compiled/selection_toggle_altKey.vg.json index 7c858f3b01..0e6821935c 100644 --- a/examples/compiled/selection_toggle_altKey.vg.json +++ b/examples/compiled/selection_toggle_altKey.vg.json @@ -48,7 +48,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.altKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json index eef8fb868d..2b095398fe 100644 --- a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json @@ -48,7 +48,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.altKey && event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_toggle_shiftKey.vg.json b/examples/compiled/selection_toggle_shiftKey.vg.json index 9b6c53dcc4..51d917f3de 100644 --- a/examples/compiled/selection_toggle_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_shiftKey.vg.json @@ -48,7 +48,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json index 5c0e111c38..b16e13c4a3 100644 --- a/examples/compiled/selection_translate_brush_drag.vg.json +++ b/examples/compiled/selection_translate_brush_drag.vg.json @@ -61,6 +61,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -116,6 +120,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json index 2e559265f1..d74f4dcbfa 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.vg.json +++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json @@ -61,6 +61,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -116,6 +120,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_type_interval.vg.json b/examples/compiled/selection_type_interval.vg.json index 2dabc0375c..fd107fde2c 100644 --- a/examples/compiled/selection_type_interval.vg.json +++ b/examples/compiled/selection_type_interval.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -124,6 +128,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_type_interval_invert.vg.json b/examples/compiled/selection_type_interval_invert.vg.json index 9c5e3cef6b..e7fd73e2b5 100644 --- a/examples/compiled/selection_type_interval_invert.vg.json +++ b/examples/compiled/selection_type_interval_invert.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -124,6 +128,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_type_multi.vg.json b/examples/compiled/selection_type_multi.vg.json index d9426fe100..ac64458512 100644 --- a/examples/compiled/selection_type_multi.vg.json +++ b/examples/compiled/selection_type_multi.vg.json @@ -57,7 +57,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_single.vg.json b/examples/compiled/selection_type_single.vg.json index ee9b7458f0..fdfefb485a 100644 --- a/examples/compiled/selection_type_single.vg.json +++ b/examples/compiled/selection_type_single.vg.json @@ -45,7 +45,8 @@ "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, diff --git a/examples/compiled/selection_type_single_dblclick.vg.json b/examples/compiled/selection_type_single_dblclick.vg.json index 2bbc7ae115..7ce22d0a68 100644 --- a/examples/compiled/selection_type_single_dblclick.vg.json +++ b/examples/compiled/selection_type_single_dblclick.vg.json @@ -45,7 +45,8 @@ "events": [{"source": "scope", "type": "dblclick"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json index 8758a7701d..7f469cc3ce 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json @@ -61,6 +61,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -116,6 +120,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json index 5c0e111c38..b16e13c4a3 100644 --- a/examples/compiled/selection_zoom_brush_wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_wheel.vg.json @@ -61,6 +61,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -116,6 +120,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, diff --git a/examples/compiled/trellis_selections.vg.json b/examples/compiled/trellis_selections.vg.json index aadd95d462..ba22d82ca7 100644 --- a/examples/compiled/trellis_selections.vg.json +++ b/examples/compiled/trellis_selections.vg.json @@ -182,6 +182,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, child_width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -411,7 +415,13 @@ }, { "name": "xenc_tuple", - "update": "xenc_X !== null ? {fields: xenc_tuple_fields, values: [xenc_X]} : null" + "update": "xenc_X !== null ? {fields: xenc_tuple_fields, values: [xenc_X]} : null", + "on": [ + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" + } + ] }, {"name": "xenc_tuple_fields", "value": [{"type": "E", "field": "X"}]}, { diff --git a/examples/compiled/vconcat_flatten.vg.json b/examples/compiled/vconcat_flatten.vg.json index 87e2eabc65..d75448a613 100644 --- a/examples/compiled/vconcat_flatten.vg.json +++ b/examples/compiled/vconcat_flatten.vg.json @@ -116,6 +116,10 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, From c9ab9370de271e931acc6d374f68f5826d82a29d Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Tue, 2 Apr 2019 03:20:39 -0400 Subject: [PATCH 17/36] migrated clear to conditional config, and interval type clear now only resets axes --- build/vega-lite-schema.json | 165 ++++++++++------------ src/compile/selection/transforms/clear.ts | 36 +++-- src/selection.ts | 3 - test/compile/selection/clear.test.ts | 47 ++---- 4 files changed, 110 insertions(+), 141 deletions(-) diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index b5220c384e..355dd3e724 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -569,7 +569,7 @@ "type": "number" }, "tickExtra": { - "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPosition\": 1` and an axis `\"padding\"` value of `0`.", + "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPostion\": 1` and an axis `\"padding\"` value of `0`.", "type": "boolean" }, "tickMinStep": { @@ -877,7 +877,7 @@ "type": "number" }, "tickExtra": { - "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPosition\": 1` and an axis `\"padding\"` value of `0`.", + "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPostion\": 1` and an axis `\"padding\"` value of `0`.", "type": "boolean" }, "tickOffset": { @@ -1487,14 +1487,6 @@ "$ref": "#/definitions/Color", "description": "Text color for title text." }, - "dx": { - "description": "Delta offset for title text x-coordinate.", - "type": "number" - }, - "dy": { - "description": "Delta offset for title text y-coordinate.", - "type": "number" - }, "font": { "description": "Font name for title text.", "type": "string" @@ -1567,6 +1559,21 @@ "field" ], "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "range": { + "type": [ + "number", + "boolean" + ] + } + }, + "required": [ + "range" + ], + "type": "object" } ] }, @@ -6484,11 +6491,15 @@ "type": "string" }, "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -6565,11 +6576,15 @@ "type": "string" }, "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -8509,11 +8524,15 @@ "additionalProperties": false, "properties": { "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -8586,11 +8605,15 @@ "additionalProperties": false, "properties": { "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -10053,37 +10076,12 @@ { "additionalProperties": false, "properties": { - "scale": { - "$ref": "#/definitions/Field" - }, - "value": { - "type": [ - "boolean", - "number", - "string", - "null" - ] - } - }, - "required": [ - "scale", - "value" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "field": { - "$ref": "#/definitions/Field" - }, "scale": { "$ref": "#/definitions/Field" } }, "required": [ - "scale", - "field" + "scale" ], "type": "object" }, @@ -10105,25 +10103,6 @@ "band" ], "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "range": { - "type": [ - "number", - "boolean" - ] - }, - "scale": { - "$ref": "#/definitions/Field" - } - }, - "required": [ - "scale", - "range" - ], - "type": "object" } ] }, @@ -10426,11 +10405,15 @@ "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information." }, "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -10500,11 +10483,15 @@ "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information." }, "clear": { - "description": "Controls clearing selections. Can be `true`, `false`, or a `string` that is\none of the [Supported Event Types](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information.", - "type": [ - "string", - "boolean" - ] + "anyOf": [ + { + "$ref": "#/definitions/EventStream" + }, + { + "type": "boolean" + } + ], + "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -11350,14 +11337,6 @@ "$ref": "#/definitions/Color", "description": "Text color for title text." }, - "dx": { - "description": "Delta offset for title text x-coordinate.", - "type": "number" - }, - "dy": { - "description": "Delta offset for title text y-coordinate.", - "type": "number" - }, "font": { "description": "Font name for title text.", "type": "string" diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index a5a033f885..fa1c625009 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -6,29 +6,49 @@ const CLEAR_DATA_SIGNALS = [TUPLE, '_toggle']; const CLEAR_VISUAL_SIGNALS = ['_x', '_y']; const CLEAR_SIGNALS = [CLEAR_DATA_SIGNALS, CLEAR_VISUAL_SIGNALS]; +const CLEAR_TRIGGERS = {mouseover: 'mouseout', click: 'dblclick'}; const CLEAR_UPDATE = ['null', '[0, 0]']; const clear: TransformCompiler = { has: selCmpt => { - return selCmpt.clear; + if (selCmpt.clear === false) { + return false; + } + return (selCmpt['on'] && selCmpt.type !== 'interval') || selCmpt['bind']; }, signals: (model, selCmpt, signals) => { - const events = parseSelector(selCmpt.clear, 'scope'); + const trigger = CLEAR_TRIGGERS[selCmpt['on']] ? CLEAR_TRIGGERS[selCmpt['on']] : 'dblclick'; + const events = selCmpt.clear ? parseSelector(selCmpt.clear, 'scope') : parseSelector(trigger, 'scope'); - CLEAR_SIGNALS.forEach((signal, k) => { - for (const ext of signal) { + if (selCmpt['bind']) { + selCmpt.project.forEach(proj => { + const ext = '_' + proj.field; const idx = signals.findIndex(n => n.name === selCmpt.name + ext); if (idx !== -1) { signals[idx].on = signals[idx].on ? signals[idx].on.concat({ events: events, - update: CLEAR_UPDATE[k] + update: CLEAR_UPDATE[0] }) - : [{events: events, update: CLEAR_UPDATE[k]}]; + : [{events: events, update: CLEAR_UPDATE[0]}]; } - } - }); + }); + } else if (selCmpt['on']) { + CLEAR_SIGNALS.forEach((signal, k) => { + for (const ext of signal) { + const idx = signals.findIndex(n => n.name === selCmpt.name + ext); + if (idx !== -1) { + signals[idx].on = signals[idx].on + ? signals[idx].on.concat({ + events: events, + update: CLEAR_UPDATE[k] + }) + : [{events: events, update: CLEAR_UPDATE[k]}]; + } + } + }); + } return signals; } }; diff --git a/src/selection.ts b/src/selection.ts index 52af067a1f..c2465ac1bd 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -269,14 +269,12 @@ export const defaultConfig: SelectionConfig = { single: { on: 'click', fields: [SELECTION_ID], - clear: 'dblclick', resolve: 'global', empty: 'all' }, multi: { on: 'click', fields: [SELECTION_ID], - clear: 'dblclick', toggle: 'event.shiftKey', resolve: 'global', empty: 'all' @@ -284,7 +282,6 @@ export const defaultConfig: SelectionConfig = { interval: { on: '[mousedown, window:mouseup] > window:mousemove!', encodings: ['x', 'y'], - clear: 'dblclick', translate: '[mousedown, window:mouseup] > window:mousemove!', zoom: 'wheel!', mark: {fill: '#333', fillOpacity: 0.125, stroke: 'white'}, diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts index 01dbb1aa60..06cb01002e 100644 --- a/test/compile/selection/clear.test.ts +++ b/test/compile/selection/clear.test.ts @@ -51,7 +51,7 @@ describe('Clear selection transform, single and multi types', () => { 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: one_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: parseSelector(selCmpts['one'].clear, 'scope'), update: 'null'} + {events: parseSelector('dblclick', 'scope'), update: 'null'} ] } ]); @@ -68,7 +68,7 @@ describe('Clear selection transform, single and multi types', () => { 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: two_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: parseSelector(selCmpts['two'].clear, 'scope'), update: 'null'} + {events: parseSelector('dblclick', 'scope'), update: 'null'} ] } ]); @@ -124,7 +124,7 @@ describe('Clear selection transform, interval type', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { - one: {type: 'interval', encodings: ['x', 'y'], translate: false, zoom: false}, + one: {type: 'interval', encodings: ['x', 'y'], bind: 'scales', translate: false, zoom: false}, two: {type: 'interval', encodings: ['x', 'y'], clear: false, translate: false, zoom: false} })); @@ -139,46 +139,20 @@ describe('Clear selection transform, interval type', () => { expect(oneSg).toEqual( expect.arrayContaining([ { - name: 'one_x', - value: [], + name: 'one_Horsepower', on: [ { - events: parseSelector('mousedown', 'scope')[0], - update: '[x(unit), x(unit)]' - }, - { - events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0], - update: '[one_x[0], clamp(x(unit), 0, width)]' - }, - { - events: {signal: 'one_scale_trigger'}, - update: '[scale("x", one_Horsepower[0]), scale("x", one_Horsepower[1])]' - }, - { - events: parseSelector(selCmpts['one'].clear, 'scope'), - update: '[0, 0]' + events: parseSelector('dblclick', 'scope'), + update: 'null' } ] }, { - name: 'one_y', - value: [], + name: 'one_Miles_per_Gallon', on: [ { - events: parseSelector('mousedown', 'scope')[0], - update: '[y(unit), y(unit)]' - }, - { - events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0], - update: '[one_y[0], clamp(y(unit), 0, height)]' - }, - { - events: {signal: 'one_scale_trigger'}, - update: '[scale("y", one_Miles_per_Gallon[0]), scale("y", one_Miles_per_Gallon[1])]' - }, - { - events: parseSelector(selCmpts['one'].clear, 'scope'), - update: '[0, 0]' + events: parseSelector('dblclick', 'scope'), + update: 'null' } ] }, @@ -189,8 +163,7 @@ describe('Clear selection transform, interval type', () => { events: [{signal: 'one_Horsepower || one_Miles_per_Gallon'}], update: 'one_Horsepower && one_Miles_per_Gallon ? {unit: "", fields: one_tuple_fields, values: [one_Horsepower,one_Miles_per_Gallon]} : null' - }, - {events: parseSelector(selCmpts['one'].clear, 'scope'), update: 'null'} + } ] } ]) From e6335a13e9b64e6bf1c5664223ca882d4f16c6d8 Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Tue, 2 Apr 2019 03:46:45 -0400 Subject: [PATCH 18/36] adding clear transform documentation --- site/docs/selection/clear.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 site/docs/selection/clear.md diff --git a/site/docs/selection/clear.md b/site/docs/selection/clear.md new file mode 100644 index 0000000000..9b4c65de61 --- /dev/null +++ b/site/docs/selection/clear.md @@ -0,0 +1,32 @@ +--- +layout: docs +menu: docs +title: Clearing a selection +permalink: /docs/clear.html +--- + +The `clear` selection transformation resets the visualization to its initial configuration: + +- For `single` and `multi` selections, it will clear all selected values. +- For `interval` selections, it will reset the grid position to its initial configuration. + +It can take one of the following values: + +- `false` -- disables clear behavior; there will be no trigger that resets the visualization to its initial configuration. +- A [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) to indicate which events should trigger clearing of the visualization. + +Vega-Lite automatically adds a clear transform to all selections by default. It will check your Vega-Lite configuration and conditionally pick an appropriate `clear` trigger based off of the `on` trigger (e.g. `click` to `dblclick`, `mouseover` to `mouseout`). + +## Examples + +Select points by clicking, and double click when you wish to clear your selected values. + +TODO: Add visualizaiton example + +Mousing out of the visualization will clear your highlighted value. + +
+ +Click and drag to shift the current position of the scales, then double click to reset the scales to their initial configuration. + +TODO: Add visualization example From 30857fea59adb6303858d6c8014de5e6fa1901ab Mon Sep 17 00:00:00 2001 From: Travis CI Date: Tue, 2 Apr 2019 08:26:02 +0000 Subject: [PATCH 19/36] [Travis] Update schema (build: 22802) --- build/vega-lite-schema.json | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index 833d43a273..40abd0573b 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -590,7 +590,7 @@ "type": "number" }, "tickExtra": { - "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPostion\": 1` and an axis `\"padding\"` value of `0`.", + "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPosition\": 1` and an axis `\"padding\"` value of `0`.", "type": "boolean" }, "tickMinStep": { @@ -898,7 +898,7 @@ "type": "number" }, "tickExtra": { - "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPostion\": 1` and an axis `\"padding\"` value of `0`.", + "description": "Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\"bandPosition\": 1` and an axis `\"padding\"` value of `0`.", "type": "boolean" }, "tickOffset": { @@ -1508,6 +1508,14 @@ "$ref": "#/definitions/Color", "description": "Text color for title text." }, + "dx": { + "description": "Delta offset for title text x-coordinate.", + "type": "number" + }, + "dy": { + "description": "Delta offset for title text y-coordinate.", + "type": "number" + }, "font": { "description": "Font name for title text.", "type": "string" @@ -11264,6 +11272,14 @@ "$ref": "#/definitions/Color", "description": "Text color for title text." }, + "dx": { + "description": "Delta offset for title text x-coordinate.", + "type": "number" + }, + "dy": { + "description": "Delta offset for title text y-coordinate.", + "type": "number" + }, "font": { "description": "Font name for title text.", "type": "string" From 2ea1ead3dbec0e6e4beca9a1117ba922650e9107 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Tue, 2 Apr 2019 08:29:12 +0000 Subject: [PATCH 20/36] [Travis] Update examples (build: 22802) --- examples/compiled/brush_table.vg.json | 12 -- .../circle_bubble_health_income.vg.json | 9 +- examples/compiled/concat_hover.vg.json | 8 + examples/compiled/concat_hover_filter.vg.json | 8 + .../compiled/interactive_area_brush.vg.json | 7 +- .../interactive_bar_select_highlight.vg.json | 2 +- examples/compiled/interactive_brush.vg.json | 11 +- .../interactive_dashboard_europe_pop.vg.json | 28 --- .../interactive_layered_crossfilter.vg.json | 24 --- .../interactive_multi_line_label.vg.json | 2 +- .../interactive_multi_line_tooltip.vg.json | 2 +- .../interactive_overview_detail.vg.json | 8 - .../compiled/interactive_paintbrush.vg.json | 4 +- .../interactive_paintbrush_color.vg.json | 4 +- ...teractive_paintbrush_color_nearest.vg.json | 4 +- .../interactive_paintbrush_interval.vg.json | 11 +- .../interactive_paintbrush_simple_all.vg.json | 4 +- ...interactive_paintbrush_simple_none.vg.json | 4 +- .../interactive_panzoom_splom.vg.json | 96 +++++---- ...interactive_panzoom_vconcat_shared.vg.json | 12 +- .../interactive_query_widgets.vg.json | 5 +- .../interactive_seattle_weather.vg.json | 8 - examples/compiled/interactive_splom.vg.json | 192 ++++++------------ examples/compiled/isotype_grid.vg.json | 11 +- .../compiled/selection_bind_cylyr.vg.json | 5 +- .../compiled/selection_bind_origin.vg.json | 5 +- .../compiled/selection_brush_timeunit.vg.json | 8 - .../selection_composition_and.vg.json | 22 +- .../compiled/selection_composition_or.vg.json | 22 +- examples/compiled/selection_concat.vg.json | 24 +-- examples/compiled/selection_filter.vg.json | 12 -- .../selection_filter_composition.vg.json | 12 -- .../selection_interval_mark_style.vg.json | 22 +- .../selection_layer_bar_month.vg.json | 7 +- .../selection_multi_condition.vg.json | 15 +- .../selection_project_binned_interval.vg.json | 7 +- .../selection_project_interval.vg.json | 11 +- .../selection_project_interval_x.vg.json | 7 +- .../selection_project_interval_x_y.vg.json | 11 +- .../selection_project_interval_y.vg.json | 7 +- .../selection_resolution_global.vg.json | 96 --------- .../selection_resolution_intersect.vg.json | 96 --------- .../selection_resolution_union.vg.json | 96 --------- .../selection_translate_brush_drag.vg.json | 11 +- ...lection_translate_brush_shift-drag.vg.json | 11 +- ...lection_translate_scatterplot_drag.vg.json | 9 +- ...n_translate_scatterplot_shift-drag.vg.json | 9 +- .../compiled/selection_type_interval.vg.json | 11 +- .../selection_type_interval_invert.vg.json | 11 +- .../selection_zoom_brush_shift-wheel.vg.json | 11 +- .../selection_zoom_brush_wheel.vg.json | 11 +- ...ction_zoom_scatterplot_shift-wheel.vg.json | 9 +- .../selection_zoom_scatterplot_wheel.vg.json | 9 +- examples/compiled/trellis_selections.vg.json | 28 +-- 54 files changed, 227 insertions(+), 864 deletions(-) diff --git a/examples/compiled/brush_table.vg.json b/examples/compiled/brush_table.vg.json index ab352e7ac8..34b6e0eb52 100644 --- a/examples/compiled/brush_table.vg.json +++ b/examples/compiled/brush_table.vg.json @@ -136,10 +136,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, concat_0_width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -195,10 +191,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -229,10 +221,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/circle_bubble_health_income.vg.json b/examples/compiled/circle_bubble_health_income.vg.json index 45fee28b1e..9b1f4449db 100644 --- a/examples/compiled/circle_bubble_health_income.vg.json +++ b/examples/compiled/circle_bubble_health_income.vg.json @@ -39,7 +39,8 @@ { "events": {"signal": "view_zoom_delta"}, "update": "zoomLog(domain(\"x\"), view_zoom_anchor.x, view_zoom_delta)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -52,7 +53,8 @@ { "events": {"signal": "view_zoom_delta"}, "update": "zoomLinear(domain(\"y\"), view_zoom_anchor.y, view_zoom_delta)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -61,8 +63,7 @@ { "events": [{"signal": "view_income || view_health"}], "update": "view_income && view_health ? {unit: \"\", fields: view_tuple_fields, values: [view_income,view_health]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/concat_hover.vg.json b/examples/compiled/concat_hover.vg.json index 1aafb554a4..3a4719db5f 100644 --- a/examples/compiled/concat_hover.vg.json +++ b/examples/compiled/concat_hover.vg.json @@ -65,6 +65,10 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_0\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "mouseout"}], + "update": "null" } ] }, @@ -170,6 +174,10 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "mouseout"}], + "update": "null" } ] }, diff --git a/examples/compiled/concat_hover_filter.vg.json b/examples/compiled/concat_hover_filter.vg.json index 13e09a9788..9b7333b77a 100644 --- a/examples/compiled/concat_hover_filter.vg.json +++ b/examples/compiled/concat_hover_filter.vg.json @@ -92,6 +92,10 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_0_layer_0\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "mouseout"}], + "update": "null" } ] }, @@ -208,6 +212,10 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1_layer_0\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true + }, + { + "events": [{"source": "scope", "type": "mouseout"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_area_brush.vg.json b/examples/compiled/interactive_area_brush.vg.json index e59a8aac09..c629fbb114 100644 --- a/examples/compiled/interactive_area_brush.vg.json +++ b/examples/compiled/interactive_area_brush.vg.json @@ -105,10 +105,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -137,8 +133,7 @@ { "events": [{"signal": "brush_yearmonth_date"}], "update": "brush_yearmonth_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_yearmonth_date]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_bar_select_highlight.vg.json b/examples/compiled/interactive_bar_select_highlight.vg.json index dee7c6c830..d2a38f719e 100644 --- a/examples/compiled/interactive_bar_select_highlight.vg.json +++ b/examples/compiled/interactive_bar_select_highlight.vg.json @@ -57,7 +57,7 @@ "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: highlight_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_brush.vg.json b/examples/compiled/interactive_brush.vg.json index ce214510f3..3bf963bac4 100644 --- a/examples/compiled/interactive_brush.vg.json +++ b/examples/compiled/interactive_brush.vg.json @@ -72,10 +72,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -132,10 +128,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -166,8 +158,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_dashboard_europe_pop.vg.json b/examples/compiled/interactive_dashboard_europe_pop.vg.json index 44b6fc4773..76dd5c3444 100644 --- a/examples/compiled/interactive_dashboard_europe_pop.vg.json +++ b/examples/compiled/interactive_dashboard_europe_pop.vg.json @@ -409,10 +409,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -441,10 +437,6 @@ { "events": [{"signal": "brush_Country"}], "update": "brush_Country ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Country]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -727,10 +719,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_1_height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -759,10 +747,6 @@ { "events": [{"signal": "brush_Country"}], "update": "brush_Country ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_Country]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1048,10 +1032,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, concat_2_width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1107,10 +1087,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_2_height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1143,10 +1119,6 @@ } ], "update": "brush_Population_ages_65_and_above_of_total && brush_Population_ages_15_64_of_total ? {unit: \"concat_2\", fields: brush_tuple_fields, values: [brush_Population_ages_65_and_above_of_total,brush_Population_ages_15_64_of_total]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter.vg.json b/examples/compiled/interactive_layered_crossfilter.vg.json index 8f85ae7d7d..32a601590b 100644 --- a/examples/compiled/interactive_layered_crossfilter.vg.json +++ b/examples/compiled/interactive_layered_crossfilter.vg.json @@ -245,10 +245,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -277,10 +273,6 @@ { "events": [{"signal": "brush_distance"}], "update": "brush_distance ? {unit: \"child__repeat_column_distance_layer_0\", fields: brush_tuple_fields, values: [brush_distance]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -617,10 +609,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -649,10 +637,6 @@ { "events": [{"signal": "brush_delay"}], "update": "brush_delay ? {unit: \"child__repeat_column_delay_layer_0\", fields: brush_tuple_fields, values: [brush_delay]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -989,10 +973,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1021,10 +1001,6 @@ { "events": [{"signal": "brush_time"}], "update": "brush_time ? {unit: \"child__repeat_column_time_layer_0\", fields: brush_tuple_fields, values: [brush_time]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_multi_line_label.vg.json b/examples/compiled/interactive_multi_line_label.vg.json index c29ab786cc..e98fe28ec6 100644 --- a/examples/compiled/interactive_multi_line_label.vg.json +++ b/examples/compiled/interactive_multi_line_label.vg.json @@ -77,7 +77,7 @@ "update": "datum && item().mark.marktype !== 'group' ? {unit: \"layer_0_layer_1\", fields: label_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"date\"]]} : null", "force": true }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_multi_line_tooltip.vg.json b/examples/compiled/interactive_multi_line_tooltip.vg.json index 91640da5f0..ab449b698b 100644 --- a/examples/compiled/interactive_multi_line_tooltip.vg.json +++ b/examples/compiled/interactive_multi_line_tooltip.vg.json @@ -48,7 +48,7 @@ "update": "datum && item().mark.marktype !== 'group' ? {unit: \"layer_2\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_overview_detail.vg.json b/examples/compiled/interactive_overview_detail.vg.json index f584679d17..e31c5944c1 100644 --- a/examples/compiled/interactive_overview_detail.vg.json +++ b/examples/compiled/interactive_overview_detail.vg.json @@ -161,10 +161,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -193,10 +189,6 @@ { "events": [{"signal": "brush_date"}], "update": "brush_date ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_date]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_paintbrush.vg.json b/examples/compiled/interactive_paintbrush.vg.json index 4f49a6071c..08c8645848 100644 --- a/examples/compiled/interactive_paintbrush.vg.json +++ b/examples/compiled/interactive_paintbrush.vg.json @@ -41,7 +41,7 @@ "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { @@ -56,7 +56,7 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_color.vg.json b/examples/compiled/interactive_paintbrush_color.vg.json index adc62590b0..3066c4cc73 100644 --- a/examples/compiled/interactive_paintbrush_color.vg.json +++ b/examples/compiled/interactive_paintbrush_color.vg.json @@ -41,7 +41,7 @@ "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { @@ -56,7 +56,7 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_color_nearest.vg.json b/examples/compiled/interactive_paintbrush_color_nearest.vg.json index e1502f94c3..3909ffbe17 100644 --- a/examples/compiled/interactive_paintbrush_color_nearest.vg.json +++ b/examples/compiled/interactive_paintbrush_color_nearest.vg.json @@ -41,7 +41,7 @@ "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { @@ -56,7 +56,7 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_interval.vg.json b/examples/compiled/interactive_paintbrush_interval.vg.json index 271f83c20a..efe1b028bf 100644 --- a/examples/compiled/interactive_paintbrush_interval.vg.json +++ b/examples/compiled/interactive_paintbrush_interval.vg.json @@ -75,10 +75,6 @@ { "events": {"signal": "paintbrush_zoom_delta"}, "update": "clampRange(zoomLinear(paintbrush_x, paintbrush_zoom_anchor.x, paintbrush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -134,10 +130,6 @@ { "events": {"signal": "paintbrush_zoom_delta"}, "update": "clampRange(zoomLinear(paintbrush_y, paintbrush_zoom_anchor.y, paintbrush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -168,8 +160,7 @@ {"signal": "paintbrush_Horsepower || paintbrush_Miles_per_Gallon"} ], "update": "paintbrush_Horsepower && paintbrush_Miles_per_Gallon ? {unit: \"\", fields: paintbrush_tuple_fields, values: [paintbrush_Horsepower,paintbrush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_all.vg.json b/examples/compiled/interactive_paintbrush_simple_all.vg.json index 9ac0be7535..6fcf34a1c2 100644 --- a/examples/compiled/interactive_paintbrush_simple_all.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_all.vg.json @@ -40,7 +40,7 @@ "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { @@ -55,7 +55,7 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_none.vg.json b/examples/compiled/interactive_paintbrush_simple_none.vg.json index 5313c2171d..6a616b3c3b 100644 --- a/examples/compiled/interactive_paintbrush_simple_none.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_none.vg.json @@ -40,7 +40,7 @@ "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { @@ -55,7 +55,7 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_panzoom_splom.vg.json b/examples/compiled/interactive_panzoom_splom.vg.json index c0e2904423..fc28564598 100644 --- a/examples/compiled/interactive_panzoom_splom.vg.json +++ b/examples/compiled/interactive_panzoom_splom.vg.json @@ -134,6 +134,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -148,6 +152,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -160,10 +168,6 @@ {"signal": "grid_Miles_per_Gallon || grid_Horsepower"} ], "update": "grid_Miles_per_Gallon && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -322,6 +326,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Horsepower__repeat_column_Acceleration_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -336,6 +344,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Horsepower__repeat_column_Acceleration_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -346,10 +358,6 @@ { "events": [{"signal": "grid_Acceleration || grid_Horsepower"}], "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -508,6 +516,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Horsepower__repeat_column_Horsepower_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -518,10 +530,6 @@ { "events": [{"signal": "grid_Horsepower"}], "update": "grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -677,6 +685,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -691,6 +703,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -703,10 +719,6 @@ {"signal": "grid_Miles_per_Gallon || grid_Acceleration"} ], "update": "grid_Miles_per_Gallon && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -865,6 +877,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Acceleration__repeat_column_Acceleration_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -875,10 +891,6 @@ { "events": [{"signal": "grid_Acceleration"}], "update": "grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1034,6 +1046,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Acceleration__repeat_column_Horsepower_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -1048,6 +1064,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Acceleration__repeat_column_Horsepower_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -1058,10 +1078,6 @@ { "events": [{"signal": "grid_Horsepower || grid_Acceleration"}], "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1220,6 +1236,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -1230,10 +1250,6 @@ { "events": [{"signal": "grid_Miles_per_Gallon"}], "update": "grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1389,6 +1405,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -1403,6 +1423,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -1415,10 +1439,6 @@ {"signal": "grid_Acceleration || grid_Miles_per_Gallon"} ], "update": "grid_Acceleration && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1577,6 +1597,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -1591,6 +1615,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -1603,10 +1631,6 @@ {"signal": "grid_Horsepower || grid_Miles_per_Gallon"} ], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json index 72368c7379..a1645806fd 100644 --- a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json +++ b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json @@ -67,6 +67,10 @@ { "events": {"signal": "region_zoom_delta"}, "update": "zoomLinear(domain(\"x\"), region_zoom_anchor.x, region_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -81,6 +85,10 @@ { "events": {"signal": "region_zoom_delta"}, "update": "zoomLinear(domain(\"concat_0_y\"), region_zoom_anchor.y, region_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -93,10 +101,6 @@ {"signal": "region_Horsepower || region_Miles_per_Gallon"} ], "update": "region_Horsepower && region_Miles_per_Gallon ? {unit: \"concat_0\", fields: region_tuple_fields, values: [region_Horsepower,region_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_query_widgets.vg.json b/examples/compiled/interactive_query_widgets.vg.json index f890297da4..6a549842fe 100644 --- a/examples/compiled/interactive_query_widgets.vg.json +++ b/examples/compiled/interactive_query_widgets.vg.json @@ -74,10 +74,7 @@ {"name": "CylYr", "update": "vlSelectionResolve(\"CylYr_store\")"}, { "name": "CylYr_tuple", - "update": "CylYr_Cylinders !== null && CylYr_Year !== null ? {fields: CylYr_tuple_fields, values: [CylYr_Cylinders, CylYr_Year]} : null", - "on": [ - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} - ] + "update": "CylYr_Cylinders !== null && CylYr_Year !== null ? {fields: CylYr_tuple_fields, values: [CylYr_Cylinders, CylYr_Year]} : null" }, { "name": "CylYr_init", diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index ca471af42f..e979424cf0 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -128,10 +128,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -160,10 +156,6 @@ { "events": [{"signal": "brush_monthdate_date"}], "update": "brush_monthdate_date ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_monthdate_date]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_splom.vg.json b/examples/compiled/interactive_splom.vg.json index 468cf9f01f..13146c29fc 100644 --- a/examples/compiled/interactive_splom.vg.json +++ b/examples/compiled/interactive_splom.vg.json @@ -174,10 +174,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -235,10 +231,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -276,10 +268,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -381,6 +369,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -395,6 +387,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -407,10 +403,6 @@ {"signal": "grid_Miles_per_Gallon || grid_Horsepower"} ], "update": "grid_Miles_per_Gallon && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -673,10 +665,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -734,10 +722,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -773,10 +757,6 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -878,6 +858,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Horsepower__repeat_column_Acceleration_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -892,6 +876,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Horsepower__repeat_column_Acceleration_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -902,10 +890,6 @@ { "events": [{"signal": "grid_Acceleration || grid_Horsepower"}], "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1168,10 +1152,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1204,10 +1184,6 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1306,6 +1282,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Horsepower__repeat_column_Horsepower_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -1316,10 +1296,6 @@ { "events": [{"signal": "grid_Horsepower"}], "update": "grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1576,10 +1552,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1637,10 +1609,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1678,10 +1646,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1783,6 +1747,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -1797,6 +1765,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -1809,10 +1781,6 @@ {"signal": "grid_Miles_per_Gallon || grid_Acceleration"} ], "update": "grid_Miles_per_Gallon && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2075,10 +2043,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2111,10 +2075,6 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2213,6 +2173,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Acceleration__repeat_column_Acceleration_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -2223,10 +2187,6 @@ { "events": [{"signal": "grid_Acceleration"}], "update": "grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2483,10 +2443,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2544,10 +2500,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2583,10 +2535,6 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2688,6 +2636,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Acceleration__repeat_column_Horsepower_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -2702,6 +2654,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Acceleration__repeat_column_Horsepower_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -2712,10 +2668,6 @@ { "events": [{"signal": "grid_Horsepower || grid_Acceleration"}], "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2978,10 +2930,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -3014,10 +2962,6 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3116,6 +3060,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -3126,10 +3074,6 @@ { "events": [{"signal": "grid_Miles_per_Gallon"}], "update": "grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3386,10 +3330,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -3447,10 +3387,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -3488,10 +3424,6 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3593,6 +3525,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -3607,6 +3543,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -3619,10 +3559,6 @@ {"signal": "grid_Acceleration || grid_Miles_per_Gallon"} ], "update": "grid_Acceleration && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3885,10 +3821,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -3946,10 +3878,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -3987,10 +3915,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -4092,6 +4016,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -4106,6 +4034,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -4118,10 +4050,6 @@ {"signal": "grid_Horsepower || grid_Miles_per_Gallon"} ], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/isotype_grid.vg.json b/examples/compiled/isotype_grid.vg.json index 7695dc731b..88c3a949d7 100644 --- a/examples/compiled/isotype_grid.vg.json +++ b/examples/compiled/isotype_grid.vg.json @@ -170,10 +170,6 @@ { "events": {"signal": "highlight_zoom_delta"}, "update": "clampRange(zoomLinear(highlight_x, highlight_zoom_anchor.x, highlight_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -226,10 +222,6 @@ { "events": {"signal": "highlight_zoom_delta"}, "update": "clampRange(zoomLinear(highlight_y, highlight_zoom_anchor.y, highlight_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -258,8 +250,7 @@ { "events": [{"signal": "highlight_col || highlight_row"}], "update": "highlight_col && highlight_row ? {unit: \"\", fields: highlight_tuple_fields, values: [highlight_col,highlight_row]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_bind_cylyr.vg.json b/examples/compiled/selection_bind_cylyr.vg.json index f58edeaef0..c2ca4c5008 100644 --- a/examples/compiled/selection_bind_cylyr.vg.json +++ b/examples/compiled/selection_bind_cylyr.vg.json @@ -53,10 +53,7 @@ {"name": "CylYr", "update": "vlSelectionResolve(\"CylYr_store\")"}, { "name": "CylYr_tuple", - "update": "CylYr_Cylinders !== null && CylYr_Year !== null ? {fields: CylYr_tuple_fields, values: [CylYr_Cylinders, CylYr_Year]} : null", - "on": [ - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} - ] + "update": "CylYr_Cylinders !== null && CylYr_Year !== null ? {fields: CylYr_tuple_fields, values: [CylYr_Cylinders, CylYr_Year]} : null" }, { "name": "CylYr_tuple_fields", diff --git a/examples/compiled/selection_bind_origin.vg.json b/examples/compiled/selection_bind_origin.vg.json index ff69365d59..19a770bd22 100644 --- a/examples/compiled/selection_bind_origin.vg.json +++ b/examples/compiled/selection_bind_origin.vg.json @@ -41,10 +41,7 @@ {"name": "org", "update": "vlSelectionResolve(\"org_store\")"}, { "name": "org_tuple", - "update": "org_Origin !== null ? {fields: org_tuple_fields, values: [org_Origin]} : null", - "on": [ - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} - ] + "update": "org_Origin !== null ? {fields: org_tuple_fields, values: [org_Origin]} : null" }, {"name": "org_tuple_fields", "value": [{"type": "E", "field": "Origin"}]}, {"name": "org_modify", "update": "modify(\"org_store\", org_tuple, true)"} diff --git a/examples/compiled/selection_brush_timeunit.vg.json b/examples/compiled/selection_brush_timeunit.vg.json index 956c71591c..410dabe1cd 100644 --- a/examples/compiled/selection_brush_timeunit.vg.json +++ b/examples/compiled/selection_brush_timeunit.vg.json @@ -125,10 +125,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, concat_0_width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -157,10 +153,6 @@ { "events": [{"signal": "brush_seconds_date"}], "update": "brush_seconds_date ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_seconds_date]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_composition_and.vg.json b/examples/compiled/selection_composition_and.vg.json index e1ff30b92f..757b6e7f2e 100644 --- a/examples/compiled/selection_composition_and.vg.json +++ b/examples/compiled/selection_composition_and.vg.json @@ -79,10 +79,6 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_x, alex_zoom_anchor.x, alex_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -136,10 +132,6 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_y, alex_zoom_anchor.y, alex_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -168,8 +160,7 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -298,10 +289,6 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_x, morgan_zoom_anchor.x, morgan_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -355,10 +342,6 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_y, morgan_zoom_anchor.y, morgan_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -387,8 +370,7 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_composition_or.vg.json b/examples/compiled/selection_composition_or.vg.json index 4baef286f5..02cbe504b4 100644 --- a/examples/compiled/selection_composition_or.vg.json +++ b/examples/compiled/selection_composition_or.vg.json @@ -79,10 +79,6 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_x, alex_zoom_anchor.x, alex_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -136,10 +132,6 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_y, alex_zoom_anchor.y, alex_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -168,8 +160,7 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -298,10 +289,6 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_x, morgan_zoom_anchor.x, morgan_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -355,10 +342,6 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_y, morgan_zoom_anchor.y, morgan_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -387,8 +370,7 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_concat.vg.json b/examples/compiled/selection_concat.vg.json index a1136df2b8..dcb03bc9a7 100644 --- a/examples/compiled/selection_concat.vg.json +++ b/examples/compiled/selection_concat.vg.json @@ -102,10 +102,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -161,10 +157,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -195,10 +187,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -462,6 +450,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"concat_1_x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -476,6 +468,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"concat_1_y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -486,10 +482,6 @@ { "events": [{"signal": "grid_Displacement || grid_Acceleration"}], "update": "grid_Displacement && grid_Acceleration ? {unit: \"concat_1\", fields: grid_tuple_fields, values: [grid_Displacement,grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json index c883e8ed94..7e0e00c81d 100644 --- a/examples/compiled/selection_filter.vg.json +++ b/examples/compiled/selection_filter.vg.json @@ -99,10 +99,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -158,10 +154,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -192,10 +184,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json index fd1832b3cd..403bf3bc66 100644 --- a/examples/compiled/selection_filter_composition.vg.json +++ b/examples/compiled/selection_filter_composition.vg.json @@ -99,10 +99,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -158,10 +154,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -192,10 +184,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_interval_mark_style.vg.json b/examples/compiled/selection_interval_mark_style.vg.json index a501b7f145..408250993a 100644 --- a/examples/compiled/selection_interval_mark_style.vg.json +++ b/examples/compiled/selection_interval_mark_style.vg.json @@ -79,10 +79,6 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_x, alex_zoom_anchor.x, alex_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -136,10 +132,6 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_y, alex_zoom_anchor.y, alex_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -168,8 +160,7 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -298,10 +289,6 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_x, morgan_zoom_anchor.x, morgan_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -355,10 +342,6 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_y, morgan_zoom_anchor.y, morgan_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -387,8 +370,7 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_layer_bar_month.vg.json b/examples/compiled/selection_layer_bar_month.vg.json index fe3ad074a3..8e8a812d05 100644 --- a/examples/compiled/selection_layer_bar_month.vg.json +++ b/examples/compiled/selection_layer_bar_month.vg.json @@ -107,10 +107,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -139,8 +135,7 @@ { "events": [{"signal": "brush_month_date"}], "update": "brush_month_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_month_date]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index 2a4bd3c1fb..7b393e6eb1 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -78,10 +78,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -137,10 +133,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -169,8 +161,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -261,7 +252,7 @@ "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: hoverbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", "force": true }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { @@ -276,7 +267,7 @@ "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_binned_interval.vg.json b/examples/compiled/selection_project_binned_interval.vg.json index 7858bf9501..5016d540be 100644 --- a/examples/compiled/selection_project_binned_interval.vg.json +++ b/examples/compiled/selection_project_binned_interval.vg.json @@ -127,10 +127,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -159,8 +155,7 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_interval.vg.json b/examples/compiled/selection_project_interval.vg.json index 5ad377cecc..1770a3c2a0 100644 --- a/examples/compiled/selection_project_interval.vg.json +++ b/examples/compiled/selection_project_interval.vg.json @@ -74,10 +74,6 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -128,10 +124,6 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -160,8 +152,7 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_interval_x.vg.json b/examples/compiled/selection_project_interval_x.vg.json index aee48e52f1..39c76cd4fb 100644 --- a/examples/compiled/selection_project_interval_x.vg.json +++ b/examples/compiled/selection_project_interval_x.vg.json @@ -74,10 +74,6 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -106,8 +102,7 @@ { "events": [{"signal": "pts_Cylinders"}], "update": "pts_Cylinders ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_interval_x_y.vg.json b/examples/compiled/selection_project_interval_x_y.vg.json index 5ad377cecc..1770a3c2a0 100644 --- a/examples/compiled/selection_project_interval_x_y.vg.json +++ b/examples/compiled/selection_project_interval_x_y.vg.json @@ -74,10 +74,6 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -128,10 +124,6 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -160,8 +152,7 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_interval_y.vg.json b/examples/compiled/selection_project_interval_y.vg.json index d0f4b87ba0..5c51f49047 100644 --- a/examples/compiled/selection_project_interval_y.vg.json +++ b/examples/compiled/selection_project_interval_y.vg.json @@ -74,10 +74,6 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -106,8 +102,7 @@ { "events": [{"signal": "pts_Origin"}], "update": "pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_resolution_global.vg.json b/examples/compiled/selection_resolution_global.vg.json index 60134d84f3..ce29e5eeb6 100644 --- a/examples/compiled/selection_resolution_global.vg.json +++ b/examples/compiled/selection_resolution_global.vg.json @@ -161,10 +161,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -220,10 +216,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -261,10 +253,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -571,10 +559,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -630,10 +614,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -669,10 +649,6 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -979,10 +955,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1015,10 +987,6 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1319,10 +1287,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1378,10 +1342,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1419,10 +1379,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1729,10 +1685,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1765,10 +1717,6 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2069,10 +2017,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2128,10 +2072,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2167,10 +2107,6 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2477,10 +2413,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2513,10 +2445,6 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2817,10 +2745,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2876,10 +2800,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2917,10 +2837,6 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3227,10 +3143,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -3286,10 +3198,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -3327,10 +3235,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_intersect.vg.json b/examples/compiled/selection_resolution_intersect.vg.json index 303e7264c8..01e9159e09 100644 --- a/examples/compiled/selection_resolution_intersect.vg.json +++ b/examples/compiled/selection_resolution_intersect.vg.json @@ -164,10 +164,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -223,10 +219,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -264,10 +256,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -526,10 +514,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -585,10 +569,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -624,10 +604,6 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -886,10 +862,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -922,10 +894,6 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1178,10 +1146,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1237,10 +1201,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1278,10 +1238,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1540,10 +1496,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1576,10 +1528,6 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1832,10 +1780,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1891,10 +1835,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1930,10 +1870,6 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2192,10 +2128,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2228,10 +2160,6 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2484,10 +2412,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2543,10 +2467,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2584,10 +2504,6 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2846,10 +2762,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2905,10 +2817,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2946,10 +2854,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_union.vg.json b/examples/compiled/selection_resolution_union.vg.json index 42b44b24f2..a49c1862ef 100644 --- a/examples/compiled/selection_resolution_union.vg.json +++ b/examples/compiled/selection_resolution_union.vg.json @@ -164,10 +164,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -223,10 +219,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -264,10 +256,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -526,10 +514,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -585,10 +569,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -624,10 +604,6 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -886,10 +862,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -922,10 +894,6 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1178,10 +1146,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1237,10 +1201,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1278,10 +1238,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1540,10 +1496,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1576,10 +1528,6 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1832,10 +1780,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1891,10 +1835,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -1930,10 +1870,6 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2192,10 +2128,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2228,10 +2160,6 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2484,10 +2412,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2543,10 +2467,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2584,10 +2504,6 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2846,10 +2762,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2905,10 +2817,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -2946,10 +2854,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json index b212c185a8..fe3fa514a4 100644 --- a/examples/compiled/selection_translate_brush_drag.vg.json +++ b/examples/compiled/selection_translate_brush_drag.vg.json @@ -71,10 +71,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -130,10 +126,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -162,8 +154,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json index a418a3c464..171bf5343e 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.vg.json +++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json @@ -71,10 +71,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -130,10 +126,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -162,8 +154,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_drag.vg.json b/examples/compiled/selection_translate_scatterplot_drag.vg.json index f6ba5cdeef..367aa26054 100644 --- a/examples/compiled/selection_translate_scatterplot_drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_drag.vg.json @@ -38,7 +38,8 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"x\"), grid_zoom_anchor.x, grid_zoom_delta)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -51,7 +52,8 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"y\"), grid_zoom_anchor.y, grid_zoom_delta)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -60,8 +62,7 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json index c03fa613d6..114f00e49c 100644 --- a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json @@ -38,7 +38,8 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"x\"), grid_zoom_anchor.x, grid_zoom_delta)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -51,7 +52,8 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"y\"), grid_zoom_anchor.y, grid_zoom_delta)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -60,8 +62,7 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_type_interval.vg.json b/examples/compiled/selection_type_interval.vg.json index 5ad377cecc..1770a3c2a0 100644 --- a/examples/compiled/selection_type_interval.vg.json +++ b/examples/compiled/selection_type_interval.vg.json @@ -74,10 +74,6 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -128,10 +124,6 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -160,8 +152,7 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_type_interval_invert.vg.json b/examples/compiled/selection_type_interval_invert.vg.json index 42d31f0ddd..9442c6896b 100644 --- a/examples/compiled/selection_type_interval_invert.vg.json +++ b/examples/compiled/selection_type_interval_invert.vg.json @@ -74,10 +74,6 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -128,10 +124,6 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -160,8 +152,7 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json index 0fd861910e..11e9546b3d 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json @@ -71,10 +71,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -130,10 +126,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -162,8 +154,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json index b212c185a8..fe3fa514a4 100644 --- a/examples/compiled/selection_zoom_brush_wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_wheel.vg.json @@ -71,10 +71,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -130,10 +126,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -162,8 +154,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json index ac8626fd8a..39670b3416 100644 --- a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json @@ -38,7 +38,8 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"x\"), grid_zoom_anchor.x, grid_zoom_delta)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -51,7 +52,8 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"y\"), grid_zoom_anchor.y, grid_zoom_delta)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -60,8 +62,7 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json index f6ba5cdeef..367aa26054 100644 --- a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json @@ -38,7 +38,8 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"x\"), grid_zoom_anchor.x, grid_zoom_delta)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -51,7 +52,8 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"y\"), grid_zoom_anchor.y, grid_zoom_delta)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -60,8 +62,7 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/trellis_selections.vg.json b/examples/compiled/trellis_selections.vg.json index 1b6731bbeb..97d2554dc7 100644 --- a/examples/compiled/trellis_selections.vg.json +++ b/examples/compiled/trellis_selections.vg.json @@ -188,10 +188,6 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, child_width)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "[0, 0]" } ] }, @@ -220,10 +216,6 @@ { "events": [{"signal": "brush_X"}], "update": "brush_X ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: brush_tuple_fields, values: [brush_X]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -319,6 +311,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"x\"), grid_zoom_anchor.x, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -333,6 +329,10 @@ { "events": {"signal": "grid_zoom_delta"}, "update": "zoomLinear(domain(\"y\"), grid_zoom_anchor.y, grid_zoom_delta)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ], "push": "outer" @@ -343,10 +343,6 @@ { "events": [{"signal": "grid_X || grid_Y"}], "update": "grid_X && grid_Y ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: grid_tuple_fields, values: [grid_X,grid_Y]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -421,13 +417,7 @@ }, { "name": "xenc_tuple", - "update": "xenc_X !== null ? {fields: xenc_tuple_fields, values: [xenc_X]} : null", - "on": [ - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" - } - ] + "update": "xenc_X !== null ? {fields: xenc_tuple_fields, values: [xenc_X]} : null" }, {"name": "xenc_tuple_fields", "value": [{"type": "E", "field": "X"}]}, { From 73777ca6a2ac06d769decca011ddb1fb6cd94fa3 Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Wed, 3 Apr 2019 00:54:54 -0400 Subject: [PATCH 21/36] simplified code a little --- src/compile/selection/transforms/clear.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index fa1c625009..7c51de3c6a 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -6,7 +6,6 @@ const CLEAR_DATA_SIGNALS = [TUPLE, '_toggle']; const CLEAR_VISUAL_SIGNALS = ['_x', '_y']; const CLEAR_SIGNALS = [CLEAR_DATA_SIGNALS, CLEAR_VISUAL_SIGNALS]; -const CLEAR_TRIGGERS = {mouseover: 'mouseout', click: 'dblclick'}; const CLEAR_UPDATE = ['null', '[0, 0]']; const clear: TransformCompiler = { @@ -18,7 +17,7 @@ const clear: TransformCompiler = { }, signals: (model, selCmpt, signals) => { - const trigger = CLEAR_TRIGGERS[selCmpt['on']] ? CLEAR_TRIGGERS[selCmpt['on']] : 'dblclick'; + const trigger = selCmpt['on'] === 'mouseover' ? 'mouseout' : 'dblclick'; const events = selCmpt.clear ? parseSelector(selCmpt.clear, 'scope') : parseSelector(trigger, 'scope'); if (selCmpt['bind']) { From ae4f8aeb49c440cf635b9f309a4d56f6e523eb1b Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Wed, 3 Apr 2019 02:21:08 -0400 Subject: [PATCH 22/36] clearing selection and panning/zooming, also updated docs and tests --- site/docs/selection/clear.md | 14 ++++------ src/compile/selection/transforms/clear.ts | 5 +--- test/compile/selection/clear.test.ts | 34 +++++++++++++++++++++-- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/site/docs/selection/clear.md b/site/docs/selection/clear.md index 9b4c65de61..2262a92007 100644 --- a/site/docs/selection/clear.md +++ b/site/docs/selection/clear.md @@ -5,28 +5,24 @@ title: Clearing a selection permalink: /docs/clear.html --- -The `clear` selection transformation resets the visualization to its initial configuration: +The `clear` selection transformation clears all selections made on the visualization: - For `single` and `multi` selections, it will clear all selected values. -- For `interval` selections, it will reset the grid position to its initial configuration. +- For `interval` selections, it will clear all selected values and clear selected scales to return to original scale domain. It can take one of the following values: - `false` -- disables clear behavior; there will be no trigger that resets the visualization to its initial configuration. - A [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) to indicate which events should trigger clearing of the visualization. -Vega-Lite automatically adds a clear transform to all selections by default. It will check your Vega-Lite configuration and conditionally pick an appropriate `clear` trigger based off of the `on` trigger (e.g. `click` to `dblclick`, `mouseover` to `mouseout`). +Vega-Lite automatically adds a clear transform to all selections by default. The default is if you're `on: mouseover`, the `clear: mouseout`, else `clear: dblclick`. ## Examples -Select points by clicking, and double click when you wish to clear your selected values. - -TODO: Add visualizaiton example - Mousing out of the visualization will clear your highlighted value. -
+
Click and drag to shift the current position of the scales, then double click to reset the scales to their initial configuration. -TODO: Add visualization example +
diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index 7c51de3c6a..18623fe292 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -10,10 +10,7 @@ const CLEAR_UPDATE = ['null', '[0, 0]']; const clear: TransformCompiler = { has: selCmpt => { - if (selCmpt.clear === false) { - return false; - } - return (selCmpt['on'] && selCmpt.type !== 'interval') || selCmpt['bind']; + return selCmpt.clear === false ? false : true; }, signals: (model, selCmpt, signals) => { diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts index 06cb01002e..d10b2479ad 100644 --- a/test/compile/selection/clear.test.ts +++ b/test/compile/selection/clear.test.ts @@ -125,12 +125,19 @@ describe('Clear selection transform, interval type', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { one: {type: 'interval', encodings: ['x', 'y'], bind: 'scales', translate: false, zoom: false}, - two: {type: 'interval', encodings: ['x', 'y'], clear: false, translate: false, zoom: false} + two: { + type: 'interval', + on: '[mousedown[event.shiftKey], window:mouseup] > window:mousemove!', + translate: false, + zoom: false + }, + three: {type: 'interval', encodings: ['x', 'y'], clear: false, translate: false, zoom: false} })); it('identifies transform invocation', () => { expect(clear.has(selCmpts['one'])).toBeTruthy(); - expect(clear.has(selCmpts['two'])).toBeFalsy(); + expect(clear.has(selCmpts['two'])).toBeTruthy(); + expect(clear.has(selCmpts['three'])).toBeFalsy(); }); it('appends clear transform', () => { @@ -169,4 +176,27 @@ describe('Clear selection transform, interval type', () => { ]) ); }); + + it('creates clear transform', () => { + const intervalTwoSg = interval.signals(model, selCmpts['two']); + const twoSg = clear.signals(model, selCmpts['two'], intervalTwoSg); + expect(twoSg).toEqual( + expect.arrayContaining([ + { + name: 'two_tuple', + on: [ + { + events: [{signal: 'two_Horsepower || two_Miles_per_Gallon'}], + update: + 'two_Horsepower && two_Miles_per_Gallon ? {unit: "", fields: two_tuple_fields, values: [two_Horsepower,two_Miles_per_Gallon]} : null' + }, + { + events: parseSelector('dblclick', 'scope'), + update: 'null' + } + ] + } + ]) + ); + }); }); From 3cdba25c227dde7df1a4d627f3edbc878022b119 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Wed, 3 Apr 2019 06:30:57 +0000 Subject: [PATCH 23/36] [Travis] Update examples (build: 22820) --- examples/compiled/brush_table.vg.json | 12 +++ .../compiled/interactive_area_brush.vg.json | 7 +- examples/compiled/interactive_brush.vg.json | 11 ++- .../interactive_dashboard_europe_pop.vg.json | 28 ++++++ .../interactive_layered_crossfilter.vg.json | 24 +++++ .../interactive_overview_detail.vg.json | 8 ++ .../interactive_paintbrush_interval.vg.json | 11 ++- .../interactive_seattle_weather.vg.json | 8 ++ examples/compiled/interactive_splom.vg.json | 96 +++++++++++++++++++ examples/compiled/isotype_grid.vg.json | 11 ++- .../compiled/selection_brush_timeunit.vg.json | 8 ++ .../selection_composition_and.vg.json | 22 ++++- .../compiled/selection_composition_or.vg.json | 22 ++++- examples/compiled/selection_concat.vg.json | 12 +++ examples/compiled/selection_filter.vg.json | 12 +++ .../selection_filter_composition.vg.json | 12 +++ .../selection_interval_mark_style.vg.json | 22 ++++- .../selection_layer_bar_month.vg.json | 7 +- .../selection_multi_condition.vg.json | 11 ++- .../selection_project_binned_interval.vg.json | 7 +- .../selection_project_interval.vg.json | 11 ++- .../selection_project_interval_x.vg.json | 7 +- .../selection_project_interval_x_y.vg.json | 11 ++- .../selection_project_interval_y.vg.json | 7 +- .../selection_resolution_global.vg.json | 96 +++++++++++++++++++ .../selection_resolution_intersect.vg.json | 96 +++++++++++++++++++ .../selection_resolution_union.vg.json | 96 +++++++++++++++++++ .../selection_translate_brush_drag.vg.json | 11 ++- ...lection_translate_brush_shift-drag.vg.json | 11 ++- .../compiled/selection_type_interval.vg.json | 11 ++- .../selection_type_interval_invert.vg.json | 11 ++- .../selection_zoom_brush_shift-wheel.vg.json | 11 ++- .../selection_zoom_brush_wheel.vg.json | 11 ++- examples/compiled/trellis_selections.vg.json | 8 ++ 34 files changed, 726 insertions(+), 23 deletions(-) diff --git a/examples/compiled/brush_table.vg.json b/examples/compiled/brush_table.vg.json index 34b6e0eb52..ab352e7ac8 100644 --- a/examples/compiled/brush_table.vg.json +++ b/examples/compiled/brush_table.vg.json @@ -136,6 +136,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, concat_0_width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -191,6 +195,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -221,6 +229,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_area_brush.vg.json b/examples/compiled/interactive_area_brush.vg.json index c629fbb114..e59a8aac09 100644 --- a/examples/compiled/interactive_area_brush.vg.json +++ b/examples/compiled/interactive_area_brush.vg.json @@ -105,6 +105,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -133,7 +137,8 @@ { "events": [{"signal": "brush_yearmonth_date"}], "update": "brush_yearmonth_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_yearmonth_date]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_brush.vg.json b/examples/compiled/interactive_brush.vg.json index 3bf963bac4..ce214510f3 100644 --- a/examples/compiled/interactive_brush.vg.json +++ b/examples/compiled/interactive_brush.vg.json @@ -72,6 +72,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -128,6 +132,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -158,7 +166,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_dashboard_europe_pop.vg.json b/examples/compiled/interactive_dashboard_europe_pop.vg.json index 76dd5c3444..44b6fc4773 100644 --- a/examples/compiled/interactive_dashboard_europe_pop.vg.json +++ b/examples/compiled/interactive_dashboard_europe_pop.vg.json @@ -409,6 +409,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -437,6 +441,10 @@ { "events": [{"signal": "brush_Country"}], "update": "brush_Country ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Country]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -719,6 +727,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_1_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -747,6 +759,10 @@ { "events": [{"signal": "brush_Country"}], "update": "brush_Country ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_Country]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1032,6 +1048,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, concat_2_width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1087,6 +1107,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_2_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1119,6 +1143,10 @@ } ], "update": "brush_Population_ages_65_and_above_of_total && brush_Population_ages_15_64_of_total ? {unit: \"concat_2\", fields: brush_tuple_fields, values: [brush_Population_ages_65_and_above_of_total,brush_Population_ages_15_64_of_total]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter.vg.json b/examples/compiled/interactive_layered_crossfilter.vg.json index 32a601590b..8f85ae7d7d 100644 --- a/examples/compiled/interactive_layered_crossfilter.vg.json +++ b/examples/compiled/interactive_layered_crossfilter.vg.json @@ -245,6 +245,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -273,6 +277,10 @@ { "events": [{"signal": "brush_distance"}], "update": "brush_distance ? {unit: \"child__repeat_column_distance_layer_0\", fields: brush_tuple_fields, values: [brush_distance]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -609,6 +617,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -637,6 +649,10 @@ { "events": [{"signal": "brush_delay"}], "update": "brush_delay ? {unit: \"child__repeat_column_delay_layer_0\", fields: brush_tuple_fields, values: [brush_delay]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -973,6 +989,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1001,6 +1021,10 @@ { "events": [{"signal": "brush_time"}], "update": "brush_time ? {unit: \"child__repeat_column_time_layer_0\", fields: brush_tuple_fields, values: [brush_time]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_overview_detail.vg.json b/examples/compiled/interactive_overview_detail.vg.json index e31c5944c1..f584679d17 100644 --- a/examples/compiled/interactive_overview_detail.vg.json +++ b/examples/compiled/interactive_overview_detail.vg.json @@ -161,6 +161,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -189,6 +193,10 @@ { "events": [{"signal": "brush_date"}], "update": "brush_date ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_date]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_paintbrush_interval.vg.json b/examples/compiled/interactive_paintbrush_interval.vg.json index efe1b028bf..271f83c20a 100644 --- a/examples/compiled/interactive_paintbrush_interval.vg.json +++ b/examples/compiled/interactive_paintbrush_interval.vg.json @@ -75,6 +75,10 @@ { "events": {"signal": "paintbrush_zoom_delta"}, "update": "clampRange(zoomLinear(paintbrush_x, paintbrush_zoom_anchor.x, paintbrush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -130,6 +134,10 @@ { "events": {"signal": "paintbrush_zoom_delta"}, "update": "clampRange(zoomLinear(paintbrush_y, paintbrush_zoom_anchor.y, paintbrush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -160,7 +168,8 @@ {"signal": "paintbrush_Horsepower || paintbrush_Miles_per_Gallon"} ], "update": "paintbrush_Horsepower && paintbrush_Miles_per_Gallon ? {unit: \"\", fields: paintbrush_tuple_fields, values: [paintbrush_Horsepower,paintbrush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index e979424cf0..ca471af42f 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -128,6 +128,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -156,6 +160,10 @@ { "events": [{"signal": "brush_monthdate_date"}], "update": "brush_monthdate_date ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_monthdate_date]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_splom.vg.json b/examples/compiled/interactive_splom.vg.json index 13146c29fc..c91f6ddb34 100644 --- a/examples/compiled/interactive_splom.vg.json +++ b/examples/compiled/interactive_splom.vg.json @@ -174,6 +174,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -231,6 +235,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -268,6 +276,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -665,6 +677,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -722,6 +738,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -757,6 +777,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1152,6 +1176,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1184,6 +1212,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1552,6 +1584,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1609,6 +1645,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1646,6 +1686,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2043,6 +2087,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2075,6 +2123,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2443,6 +2495,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2500,6 +2556,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2535,6 +2595,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2930,6 +2994,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2962,6 +3030,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3330,6 +3402,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3387,6 +3463,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3424,6 +3504,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3821,6 +3905,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3878,6 +3966,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3915,6 +4007,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/isotype_grid.vg.json b/examples/compiled/isotype_grid.vg.json index 88c3a949d7..7695dc731b 100644 --- a/examples/compiled/isotype_grid.vg.json +++ b/examples/compiled/isotype_grid.vg.json @@ -170,6 +170,10 @@ { "events": {"signal": "highlight_zoom_delta"}, "update": "clampRange(zoomLinear(highlight_x, highlight_zoom_anchor.x, highlight_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -222,6 +226,10 @@ { "events": {"signal": "highlight_zoom_delta"}, "update": "clampRange(zoomLinear(highlight_y, highlight_zoom_anchor.y, highlight_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -250,7 +258,8 @@ { "events": [{"signal": "highlight_col || highlight_row"}], "update": "highlight_col && highlight_row ? {unit: \"\", fields: highlight_tuple_fields, values: [highlight_col,highlight_row]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_brush_timeunit.vg.json b/examples/compiled/selection_brush_timeunit.vg.json index 410dabe1cd..956c71591c 100644 --- a/examples/compiled/selection_brush_timeunit.vg.json +++ b/examples/compiled/selection_brush_timeunit.vg.json @@ -125,6 +125,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, concat_0_width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -153,6 +157,10 @@ { "events": [{"signal": "brush_seconds_date"}], "update": "brush_seconds_date ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_seconds_date]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_composition_and.vg.json b/examples/compiled/selection_composition_and.vg.json index 757b6e7f2e..e1ff30b92f 100644 --- a/examples/compiled/selection_composition_and.vg.json +++ b/examples/compiled/selection_composition_and.vg.json @@ -79,6 +79,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_x, alex_zoom_anchor.x, alex_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -132,6 +136,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_y, alex_zoom_anchor.y, alex_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -160,7 +168,8 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -289,6 +298,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_x, morgan_zoom_anchor.x, morgan_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -342,6 +355,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_y, morgan_zoom_anchor.y, morgan_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -370,7 +387,8 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_composition_or.vg.json b/examples/compiled/selection_composition_or.vg.json index 02cbe504b4..4baef286f5 100644 --- a/examples/compiled/selection_composition_or.vg.json +++ b/examples/compiled/selection_composition_or.vg.json @@ -79,6 +79,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_x, alex_zoom_anchor.x, alex_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -132,6 +136,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_y, alex_zoom_anchor.y, alex_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -160,7 +168,8 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -289,6 +298,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_x, morgan_zoom_anchor.x, morgan_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -342,6 +355,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_y, morgan_zoom_anchor.y, morgan_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -370,7 +387,8 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_concat.vg.json b/examples/compiled/selection_concat.vg.json index dcb03bc9a7..d9bf62b2fd 100644 --- a/examples/compiled/selection_concat.vg.json +++ b/examples/compiled/selection_concat.vg.json @@ -102,6 +102,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -157,6 +161,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -187,6 +195,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json index 7e0e00c81d..c883e8ed94 100644 --- a/examples/compiled/selection_filter.vg.json +++ b/examples/compiled/selection_filter.vg.json @@ -99,6 +99,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -154,6 +158,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -184,6 +192,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json index 403bf3bc66..fd1832b3cd 100644 --- a/examples/compiled/selection_filter_composition.vg.json +++ b/examples/compiled/selection_filter_composition.vg.json @@ -99,6 +99,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -154,6 +158,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, concat_0_height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -184,6 +192,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_interval_mark_style.vg.json b/examples/compiled/selection_interval_mark_style.vg.json index 408250993a..a501b7f145 100644 --- a/examples/compiled/selection_interval_mark_style.vg.json +++ b/examples/compiled/selection_interval_mark_style.vg.json @@ -79,6 +79,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_x, alex_zoom_anchor.x, alex_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -132,6 +136,10 @@ { "events": {"signal": "alex_zoom_delta"}, "update": "clampRange(zoomLinear(alex_y, alex_zoom_anchor.y, alex_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -160,7 +168,8 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -289,6 +298,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_x, morgan_zoom_anchor.x, morgan_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -342,6 +355,10 @@ { "events": {"signal": "morgan_zoom_delta"}, "update": "clampRange(zoomLinear(morgan_y, morgan_zoom_anchor.y, morgan_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -370,7 +387,8 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_layer_bar_month.vg.json b/examples/compiled/selection_layer_bar_month.vg.json index 8e8a812d05..fe3ad074a3 100644 --- a/examples/compiled/selection_layer_bar_month.vg.json +++ b/examples/compiled/selection_layer_bar_month.vg.json @@ -107,6 +107,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -135,7 +139,8 @@ { "events": [{"signal": "brush_month_date"}], "update": "brush_month_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_month_date]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index 7b393e6eb1..111316024f 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -78,6 +78,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -133,6 +137,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -161,7 +169,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_binned_interval.vg.json b/examples/compiled/selection_project_binned_interval.vg.json index 5016d540be..7858bf9501 100644 --- a/examples/compiled/selection_project_binned_interval.vg.json +++ b/examples/compiled/selection_project_binned_interval.vg.json @@ -127,6 +127,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -155,7 +159,8 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval.vg.json b/examples/compiled/selection_project_interval.vg.json index 1770a3c2a0..5ad377cecc 100644 --- a/examples/compiled/selection_project_interval.vg.json +++ b/examples/compiled/selection_project_interval.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -124,6 +128,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -152,7 +160,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_x.vg.json b/examples/compiled/selection_project_interval_x.vg.json index 39c76cd4fb..aee48e52f1 100644 --- a/examples/compiled/selection_project_interval_x.vg.json +++ b/examples/compiled/selection_project_interval_x.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -102,7 +106,8 @@ { "events": [{"signal": "pts_Cylinders"}], "update": "pts_Cylinders ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_x_y.vg.json b/examples/compiled/selection_project_interval_x_y.vg.json index 1770a3c2a0..5ad377cecc 100644 --- a/examples/compiled/selection_project_interval_x_y.vg.json +++ b/examples/compiled/selection_project_interval_x_y.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -124,6 +128,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -152,7 +160,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_y.vg.json b/examples/compiled/selection_project_interval_y.vg.json index 5c51f49047..d0f4b87ba0 100644 --- a/examples/compiled/selection_project_interval_y.vg.json +++ b/examples/compiled/selection_project_interval_y.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -102,7 +106,8 @@ { "events": [{"signal": "pts_Origin"}], "update": "pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_resolution_global.vg.json b/examples/compiled/selection_resolution_global.vg.json index ce29e5eeb6..60134d84f3 100644 --- a/examples/compiled/selection_resolution_global.vg.json +++ b/examples/compiled/selection_resolution_global.vg.json @@ -161,6 +161,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -216,6 +220,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -253,6 +261,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -559,6 +571,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -614,6 +630,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -649,6 +669,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -955,6 +979,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -987,6 +1015,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1287,6 +1319,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1342,6 +1378,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1379,6 +1419,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1685,6 +1729,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1717,6 +1765,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2017,6 +2069,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2072,6 +2128,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2107,6 +2167,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2413,6 +2477,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2445,6 +2513,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2745,6 +2817,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2800,6 +2876,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2837,6 +2917,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3143,6 +3227,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3198,6 +3286,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -3235,6 +3327,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_intersect.vg.json b/examples/compiled/selection_resolution_intersect.vg.json index 01e9159e09..303e7264c8 100644 --- a/examples/compiled/selection_resolution_intersect.vg.json +++ b/examples/compiled/selection_resolution_intersect.vg.json @@ -164,6 +164,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -219,6 +223,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -256,6 +264,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -514,6 +526,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -569,6 +585,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -604,6 +624,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -862,6 +886,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -894,6 +922,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1146,6 +1178,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1201,6 +1237,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1238,6 +1278,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1496,6 +1540,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1528,6 +1576,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1780,6 +1832,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1835,6 +1891,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1870,6 +1930,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2128,6 +2192,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2160,6 +2228,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2412,6 +2484,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2467,6 +2543,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2504,6 +2584,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2762,6 +2846,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2817,6 +2905,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2854,6 +2946,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_union.vg.json b/examples/compiled/selection_resolution_union.vg.json index a49c1862ef..42b44b24f2 100644 --- a/examples/compiled/selection_resolution_union.vg.json +++ b/examples/compiled/selection_resolution_union.vg.json @@ -164,6 +164,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -219,6 +223,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -256,6 +264,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -514,6 +526,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -569,6 +585,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -604,6 +624,10 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -862,6 +886,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -894,6 +922,10 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1146,6 +1178,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1201,6 +1237,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1238,6 +1278,10 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1496,6 +1540,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1528,6 +1576,10 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1780,6 +1832,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1835,6 +1891,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -1870,6 +1930,10 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2128,6 +2192,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2160,6 +2228,10 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2412,6 +2484,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2467,6 +2543,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2504,6 +2584,10 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2762,6 +2846,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2817,6 +2905,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -2854,6 +2946,10 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json index fe3fa514a4..b212c185a8 100644 --- a/examples/compiled/selection_translate_brush_drag.vg.json +++ b/examples/compiled/selection_translate_brush_drag.vg.json @@ -71,6 +71,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -126,6 +130,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -154,7 +162,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json index 171bf5343e..a418a3c464 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.vg.json +++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json @@ -71,6 +71,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -126,6 +130,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -154,7 +162,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_interval.vg.json b/examples/compiled/selection_type_interval.vg.json index 1770a3c2a0..5ad377cecc 100644 --- a/examples/compiled/selection_type_interval.vg.json +++ b/examples/compiled/selection_type_interval.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -124,6 +128,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -152,7 +160,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_interval_invert.vg.json b/examples/compiled/selection_type_interval_invert.vg.json index 9442c6896b..42d31f0ddd 100644 --- a/examples/compiled/selection_type_interval_invert.vg.json +++ b/examples/compiled/selection_type_interval_invert.vg.json @@ -74,6 +74,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_x, pts_zoom_anchor.x, pts_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -124,6 +128,10 @@ { "events": {"signal": "pts_zoom_delta"}, "update": "clampRange(zoomLinear(pts_y, pts_zoom_anchor.y, pts_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -152,7 +160,8 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json index 11e9546b3d..0fd861910e 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json @@ -71,6 +71,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -126,6 +130,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -154,7 +162,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json index fe3fa514a4..b212c185a8 100644 --- a/examples/compiled/selection_zoom_brush_wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_wheel.vg.json @@ -71,6 +71,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -126,6 +130,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -154,7 +162,8 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/trellis_selections.vg.json b/examples/compiled/trellis_selections.vg.json index 97d2554dc7..40b3b4f83d 100644 --- a/examples/compiled/trellis_selections.vg.json +++ b/examples/compiled/trellis_selections.vg.json @@ -188,6 +188,10 @@ { "events": {"signal": "brush_zoom_delta"}, "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, child_width)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "[0, 0]" } ] }, @@ -216,6 +220,10 @@ { "events": [{"signal": "brush_X"}], "update": "brush_X ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: brush_tuple_fields, values: [brush_X]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, From f0804b214d53054bf1a9ece6f5be59efdba2e167 Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Fri, 5 Apr 2019 08:06:09 -0400 Subject: [PATCH 24/36] significantly refactored clear code --- src/compile/selection/transforms/clear.ts | 53 ++++++++--------------- test/compile/selection/clear.test.ts | 4 ++ 2 files changed, 22 insertions(+), 35 deletions(-) diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index 18623fe292..21ad3a65ad 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -1,13 +1,8 @@ +import {NewSignal, Update} from 'vega'; import {selector as parseSelector} from 'vega-event-selector'; import {TUPLE} from '..'; import {TransformCompiler} from './transforms'; -const CLEAR_DATA_SIGNALS = [TUPLE, '_toggle']; -const CLEAR_VISUAL_SIGNALS = ['_x', '_y']; - -const CLEAR_SIGNALS = [CLEAR_DATA_SIGNALS, CLEAR_VISUAL_SIGNALS]; -const CLEAR_UPDATE = ['null', '[0, 0]']; - const clear: TransformCompiler = { has: selCmpt => { return selCmpt.clear === false ? false : true; @@ -16,37 +11,25 @@ const clear: TransformCompiler = { signals: (model, selCmpt, signals) => { const trigger = selCmpt['on'] === 'mouseover' ? 'mouseout' : 'dblclick'; const events = selCmpt.clear ? parseSelector(selCmpt.clear, 'scope') : parseSelector(trigger, 'scope'); - - if (selCmpt['bind']) { - selCmpt.project.forEach(proj => { - const ext = '_' + proj.field; - const idx = signals.findIndex(n => n.name === selCmpt.name + ext); - if (idx !== -1) { - signals[idx].on = signals[idx].on - ? signals[idx].on.concat({ - events: events, - update: CLEAR_UPDATE[0] - }) - : [{events: events, update: CLEAR_UPDATE[0]}]; - } - }); - } else if (selCmpt['on']) { - CLEAR_SIGNALS.forEach((signal, k) => { - for (const ext of signal) { - const idx = signals.findIndex(n => n.name === selCmpt.name + ext); - if (idx !== -1) { - signals[idx].on = signals[idx].on - ? signals[idx].on.concat({ - events: events, - update: CLEAR_UPDATE[k] - }) - : [{events: events, update: CLEAR_UPDATE[k]}]; - } - } - }); - } + selCmpt.project.forEach(proj => { + const d_idx = signals.findIndex(n => n.name === proj.signals.data); + const v_idx = signals.findIndex(n => n.name === proj.signals.visual); + addClear(d_idx, signals, events, 'null'); + addClear(v_idx, signals, events, '[0, 0]'); + }); + const t_idx = signals.findIndex(n => n.name === selCmpt.name + TUPLE); + addClear(t_idx, signals, events, 'null'); return signals; } }; export default clear; + +function addClear(idx: number, signals: NewSignal[], events: any[], update: Update) { + if (idx !== -1 && signals[idx].on) { + signals[idx].on.push({ + events: events, + update: update + }); + } +} diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts index d10b2479ad..97f3f1f49a 100644 --- a/test/compile/selection/clear.test.ts +++ b/test/compile/selection/clear.test.ts @@ -170,6 +170,10 @@ describe('Clear selection transform, interval type', () => { events: [{signal: 'one_Horsepower || one_Miles_per_Gallon'}], update: 'one_Horsepower && one_Miles_per_Gallon ? {unit: "", fields: one_tuple_fields, values: [one_Horsepower,one_Miles_per_Gallon]} : null' + }, + { + events: parseSelector('dblclick', 'scope'), + update: 'null' } ] } From d105409758180bc2f70ab6848030becbfdcc9aca Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Fri, 5 Apr 2019 08:16:29 -0400 Subject: [PATCH 25/36] updating TSDocs and Vega-lite docs --- build/vega-lite-schema.json | 12 ++++++------ site/docs/selection/clear.md | 4 ++-- src/selection.ts | 25 +++++++++++++------------ 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index 40abd0573b..e17f31badb 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -6472,7 +6472,7 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." + "description": "Controls clearing selections. Clears all selected values and returns the visualization\nto its original scale domains. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -6557,7 +6557,7 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." + "description": "Controls clearing selections. Clears all selected values and returns the visualization\nto its original scale domains. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -8505,7 +8505,7 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." + "description": "Controls clearing selections. Clears all selected values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -8586,7 +8586,7 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." + "description": "Controls clearing selections. Clears all selected values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -10340,7 +10340,7 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." + "description": "Controls clearing selections. Clears all selected values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -10418,7 +10418,7 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/).\n\n__Default value:__ `true`, which corresponds to `dblclick` (i.e.\nuser doubleclick clears current selection).\n\nSee the [TODO: clear] documentation for more information." + "description": "Controls clearing selections. Clears all selected values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", diff --git a/site/docs/selection/clear.md b/site/docs/selection/clear.md index 2262a92007..2667da26f8 100644 --- a/site/docs/selection/clear.md +++ b/site/docs/selection/clear.md @@ -8,14 +8,14 @@ permalink: /docs/clear.html The `clear` selection transformation clears all selections made on the visualization: - For `single` and `multi` selections, it will clear all selected values. -- For `interval` selections, it will clear all selected values and clear selected scales to return to original scale domain. +- For `interval` selections, it will clear all selected values and return the visualization to its original scale domain. It can take one of the following values: - `false` -- disables clear behavior; there will be no trigger that resets the visualization to its initial configuration. - A [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) to indicate which events should trigger clearing of the visualization. -Vega-Lite automatically adds a clear transform to all selections by default. The default is if you're `on: mouseover`, the `clear: mouseout`, else `clear: dblclick`. +Vega-Lite automatically adds a clear transform to all selections by default. The default is `clear: mouseout` if you're `on: mouseover`, else `clear: dblclick`. ## Examples diff --git a/src/selection.ts b/src/selection.ts index c2465ac1bd..f97c878f2f 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -58,12 +58,12 @@ export interface BaseSelectionDef { export interface SingleSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Clears all selected values. Can be an + * [EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`. * - * __Default value:__ `true`, which corresponds to `dblclick` (i.e. - * user doubleclick clears current selection). + * __Default value:__ `mouseout` if `on: mouseover` else `dblclick`. * - * See the [TODO: clear] documentation for more information. + * See the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information. */ clear?: EventStream | boolean; /** @@ -92,12 +92,12 @@ export interface SingleSelectionConfig extends BaseSelectionDef { export interface MultiSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Clears all selected values. Can be an + * [EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`. * - * __Default value:__ `true`, which corresponds to `dblclick` (i.e. - * user doubleclick clears current selection). + * __Default value:__ `mouseout` if `on: mouseover` else `dblclick`. * - * See the [TODO: clear] documentation for more information. + * See the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information. */ clear?: EventStream | boolean; @@ -169,12 +169,13 @@ export interface BrushConfig { export interface IntervalSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Can be `true`, `false`, or an [EventStream](https://vega.github.io/vega/docs/event-streams/). + * Controls clearing selections. Clears all selected values and returns the visualization + * to its original scale domains. Can be an + * [EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`. * - * __Default value:__ `true`, which corresponds to `dblclick` (i.e. - * user doubleclick clears current selection). + * __Default value:__ `mouseout` if `on: mouseover` else `dblclick`. * - * See the [TODO: clear] documentation for more information. + * See the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information. */ clear?: EventStream | boolean; /** From 937aa9fb6d66eca1754023819178cd838df024e6 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 5 Apr 2019 12:26:13 +0000 Subject: [PATCH 26/36] [Travis] Update examples (build: 22858) --- examples/compiled/brush_table.vg.json | 8 ++ .../circle_bubble_health_income.vg.json | 3 +- .../compiled/interactive_area_brush.vg.json | 3 +- .../interactive_bar_select_highlight.vg.json | 3 +- examples/compiled/interactive_brush.vg.json | 6 +- .../interactive_dashboard_europe_pop.vg.json | 16 ++++ .../interactive_layered_crossfilter.vg.json | 12 +++ ...ctive_layered_crossfilter_discrete.vg.json | 12 --- .../interactive_overview_detail.vg.json | 4 + .../compiled/interactive_paintbrush.vg.json | 3 +- .../interactive_paintbrush_color.vg.json | 3 +- ...teractive_paintbrush_color_nearest.vg.json | 3 +- .../interactive_paintbrush_interval.vg.json | 6 +- .../interactive_paintbrush_simple_all.vg.json | 3 +- ...interactive_paintbrush_simple_none.vg.json | 3 +- .../interactive_panzoom_splom.vg.json | 36 +++++++ ...interactive_panzoom_vconcat_shared.vg.json | 4 + .../interactive_seattle_weather.vg.json | 8 +- examples/compiled/interactive_splom.vg.json | 96 +++++++++++++++++++ examples/compiled/isotype_grid.vg.json | 6 +- .../compiled/selection_brush_timeunit.vg.json | 4 + .../selection_composition_and.vg.json | 12 ++- .../compiled/selection_composition_or.vg.json | 12 ++- examples/compiled/selection_concat.vg.json | 12 +++ examples/compiled/selection_filter.vg.json | 8 ++ .../selection_filter_composition.vg.json | 8 ++ .../selection_interval_mark_style.vg.json | 12 ++- .../selection_layer_bar_month.vg.json | 3 +- .../selection_multi_condition.vg.json | 9 +- .../selection_project_binned_interval.vg.json | 3 +- .../selection_project_interval.vg.json | 6 +- .../selection_project_interval_x.vg.json | 3 +- .../selection_project_interval_x_y.vg.json | 6 +- .../selection_project_interval_y.vg.json | 3 +- .../compiled/selection_project_multi.vg.json | 3 +- .../selection_project_multi_cylinders.vg.json | 3 +- ...ion_project_multi_cylinders_origin.vg.json | 3 +- .../selection_project_multi_origin.vg.json | 3 +- .../selection_resolution_global.vg.json | 60 ++++++++++++ .../selection_resolution_intersect.vg.json | 60 ++++++++++++ .../selection_resolution_union.vg.json | 60 ++++++++++++ .../compiled/selection_toggle_altKey.vg.json | 3 +- .../selection_toggle_altKey_shiftKey.vg.json | 3 +- .../selection_toggle_shiftKey.vg.json | 3 +- .../selection_translate_brush_drag.vg.json | 6 +- ...lection_translate_brush_shift-drag.vg.json | 6 +- ...lection_translate_scatterplot_drag.vg.json | 3 +- ...n_translate_scatterplot_shift-drag.vg.json | 3 +- .../compiled/selection_type_interval.vg.json | 6 +- .../selection_type_interval_invert.vg.json | 6 +- .../compiled/selection_type_multi.vg.json | 3 +- .../selection_zoom_brush_shift-wheel.vg.json | 6 +- .../selection_zoom_brush_wheel.vg.json | 6 +- ...ction_zoom_scatterplot_shift-wheel.vg.json | 3 +- .../selection_zoom_scatterplot_wheel.vg.json | 3 +- examples/compiled/trellis_selections.vg.json | 8 ++ examples/compiled/vconcat_flatten.vg.json | 4 - 57 files changed, 507 insertions(+), 96 deletions(-) diff --git a/examples/compiled/brush_table.vg.json b/examples/compiled/brush_table.vg.json index ab352e7ac8..680d42611d 100644 --- a/examples/compiled/brush_table.vg.json +++ b/examples/compiled/brush_table.vg.json @@ -149,6 +149,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -208,6 +212,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_0_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/circle_bubble_health_income.vg.json b/examples/compiled/circle_bubble_health_income.vg.json index 9b1f4449db..742702dcc7 100644 --- a/examples/compiled/circle_bubble_health_income.vg.json +++ b/examples/compiled/circle_bubble_health_income.vg.json @@ -63,7 +63,8 @@ { "events": [{"signal": "view_income || view_health"}], "update": "view_income && view_health ? {unit: \"\", fields: view_tuple_fields, values: [view_income,view_health]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_area_brush.vg.json b/examples/compiled/interactive_area_brush.vg.json index e59a8aac09..456e99ff69 100644 --- a/examples/compiled/interactive_area_brush.vg.json +++ b/examples/compiled/interactive_area_brush.vg.json @@ -118,7 +118,8 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_bar_select_highlight.vg.json b/examples/compiled/interactive_bar_select_highlight.vg.json index d2a38f719e..b5f7c79909 100644 --- a/examples/compiled/interactive_bar_select_highlight.vg.json +++ b/examples/compiled/interactive_bar_select_highlight.vg.json @@ -90,8 +90,7 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_brush.vg.json b/examples/compiled/interactive_brush.vg.json index ce214510f3..978b29371b 100644 --- a/examples/compiled/interactive_brush.vg.json +++ b/examples/compiled/interactive_brush.vg.json @@ -86,7 +86,8 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -146,7 +147,8 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_dashboard_europe_pop.vg.json b/examples/compiled/interactive_dashboard_europe_pop.vg.json index 44b6fc4773..57972bac88 100644 --- a/examples/compiled/interactive_dashboard_europe_pop.vg.json +++ b/examples/compiled/interactive_dashboard_europe_pop.vg.json @@ -422,6 +422,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_0_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -740,6 +744,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_1_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1061,6 +1069,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_2_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1120,6 +1132,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_2_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter.vg.json b/examples/compiled/interactive_layered_crossfilter.vg.json index 8f85ae7d7d..0bf8847383 100644 --- a/examples/compiled/interactive_layered_crossfilter.vg.json +++ b/examples/compiled/interactive_layered_crossfilter.vg.json @@ -258,6 +258,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_column_distance_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -630,6 +634,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_column_delay_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1002,6 +1010,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_column_time_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json index c13a1b3336..8de466f0c4 100644 --- a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json +++ b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json @@ -227,10 +227,6 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -389,10 +385,6 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -551,10 +543,6 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_overview_detail.vg.json b/examples/compiled/interactive_overview_detail.vg.json index f584679d17..a69c2844a2 100644 --- a/examples/compiled/interactive_overview_detail.vg.json +++ b/examples/compiled/interactive_overview_detail.vg.json @@ -174,6 +174,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_1_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_paintbrush.vg.json b/examples/compiled/interactive_paintbrush.vg.json index 08c8645848..903c654250 100644 --- a/examples/compiled/interactive_paintbrush.vg.json +++ b/examples/compiled/interactive_paintbrush.vg.json @@ -55,8 +55,7 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_paintbrush_color.vg.json b/examples/compiled/interactive_paintbrush_color.vg.json index 3066c4cc73..066aabc3e4 100644 --- a/examples/compiled/interactive_paintbrush_color.vg.json +++ b/examples/compiled/interactive_paintbrush_color.vg.json @@ -55,8 +55,7 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_paintbrush_color_nearest.vg.json b/examples/compiled/interactive_paintbrush_color_nearest.vg.json index 3909ffbe17..b081a05d69 100644 --- a/examples/compiled/interactive_paintbrush_color_nearest.vg.json +++ b/examples/compiled/interactive_paintbrush_color_nearest.vg.json @@ -55,8 +55,7 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_paintbrush_interval.vg.json b/examples/compiled/interactive_paintbrush_interval.vg.json index 271f83c20a..284771975e 100644 --- a/examples/compiled/interactive_paintbrush_interval.vg.json +++ b/examples/compiled/interactive_paintbrush_interval.vg.json @@ -88,7 +88,8 @@ { "events": {"signal": "paintbrush_x"}, "update": "paintbrush_x[0] === paintbrush_x[1] ? null : invert(\"x\", paintbrush_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -147,7 +148,8 @@ { "events": {"signal": "paintbrush_y"}, "update": "paintbrush_y[0] === paintbrush_y[1] ? null : invert(\"y\", paintbrush_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_all.vg.json b/examples/compiled/interactive_paintbrush_simple_all.vg.json index 6fcf34a1c2..a6b2b77197 100644 --- a/examples/compiled/interactive_paintbrush_simple_all.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_all.vg.json @@ -54,8 +54,7 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_none.vg.json b/examples/compiled/interactive_paintbrush_simple_none.vg.json index 6a616b3c3b..d80e0d3d66 100644 --- a/examples/compiled/interactive_paintbrush_simple_none.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_none.vg.json @@ -54,8 +54,7 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_panzoom_splom.vg.json b/examples/compiled/interactive_panzoom_splom.vg.json index fc28564598..02291f2069 100644 --- a/examples/compiled/interactive_panzoom_splom.vg.json +++ b/examples/compiled/interactive_panzoom_splom.vg.json @@ -168,6 +168,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Horsepower"} ], "update": "grid_Miles_per_Gallon && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -358,6 +362,10 @@ { "events": [{"signal": "grid_Acceleration || grid_Horsepower"}], "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -530,6 +538,10 @@ { "events": [{"signal": "grid_Horsepower"}], "update": "grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -719,6 +731,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Acceleration"} ], "update": "grid_Miles_per_Gallon && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -891,6 +907,10 @@ { "events": [{"signal": "grid_Acceleration"}], "update": "grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1078,6 +1098,10 @@ { "events": [{"signal": "grid_Horsepower || grid_Acceleration"}], "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1250,6 +1274,10 @@ { "events": [{"signal": "grid_Miles_per_Gallon"}], "update": "grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1439,6 +1467,10 @@ {"signal": "grid_Acceleration || grid_Miles_per_Gallon"} ], "update": "grid_Acceleration && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1631,6 +1663,10 @@ {"signal": "grid_Horsepower || grid_Miles_per_Gallon"} ], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json index a1645806fd..0c3c1138ec 100644 --- a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json +++ b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json @@ -101,6 +101,10 @@ {"signal": "region_Horsepower || region_Miles_per_Gallon"} ], "update": "region_Horsepower && region_Miles_per_Gallon ? {unit: \"concat_0\", fields: region_tuple_fields, values: [region_Horsepower,region_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index ca471af42f..d73802ebfe 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -141,6 +141,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -449,10 +453,6 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_splom.vg.json b/examples/compiled/interactive_splom.vg.json index c91f6ddb34..087b704931 100644 --- a/examples/compiled/interactive_splom.vg.json +++ b/examples/compiled/interactive_splom.vg.json @@ -187,6 +187,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -248,6 +252,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -415,6 +423,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Horsepower"} ], "update": "grid_Miles_per_Gallon && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -690,6 +702,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -751,6 +767,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -914,6 +934,10 @@ { "events": [{"signal": "grid_Acceleration || grid_Horsepower"}], "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1189,6 +1213,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1328,6 +1356,10 @@ { "events": [{"signal": "grid_Horsepower"}], "update": "grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1597,6 +1629,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1658,6 +1694,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1825,6 +1865,10 @@ {"signal": "grid_Miles_per_Gallon || grid_Acceleration"} ], "update": "grid_Miles_per_Gallon && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2100,6 +2144,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2239,6 +2287,10 @@ { "events": [{"signal": "grid_Acceleration"}], "update": "grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2508,6 +2560,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2569,6 +2625,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2732,6 +2792,10 @@ { "events": [{"signal": "grid_Horsepower || grid_Acceleration"}], "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3007,6 +3071,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3146,6 +3214,10 @@ { "events": [{"signal": "grid_Miles_per_Gallon"}], "update": "grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3415,6 +3487,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3476,6 +3552,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3643,6 +3723,10 @@ {"signal": "grid_Acceleration || grid_Miles_per_Gallon"} ], "update": "grid_Acceleration && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3918,6 +4002,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3979,6 +4067,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -4146,6 +4238,10 @@ {"signal": "grid_Horsepower || grid_Miles_per_Gallon"} ], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/isotype_grid.vg.json b/examples/compiled/isotype_grid.vg.json index 7695dc731b..88fe3d8596 100644 --- a/examples/compiled/isotype_grid.vg.json +++ b/examples/compiled/isotype_grid.vg.json @@ -183,7 +183,8 @@ { "events": {"signal": "highlight_x"}, "update": "highlight_x[0] === highlight_x[1] ? null : invert(\"x\", highlight_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -239,7 +240,8 @@ { "events": {"signal": "highlight_y"}, "update": "highlight_y[0] === highlight_y[1] ? null : invert(\"y\", highlight_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_brush_timeunit.vg.json b/examples/compiled/selection_brush_timeunit.vg.json index 956c71591c..6cd5dea6a3 100644 --- a/examples/compiled/selection_brush_timeunit.vg.json +++ b/examples/compiled/selection_brush_timeunit.vg.json @@ -138,6 +138,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_composition_and.vg.json b/examples/compiled/selection_composition_and.vg.json index e1ff30b92f..7bea2ac49b 100644 --- a/examples/compiled/selection_composition_and.vg.json +++ b/examples/compiled/selection_composition_and.vg.json @@ -92,7 +92,8 @@ { "events": {"signal": "alex_x"}, "update": "alex_x[0] === alex_x[1] ? null : invert(\"x\", alex_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -149,7 +150,8 @@ { "events": {"signal": "alex_y"}, "update": "alex_y[0] === alex_y[1] ? null : invert(\"y\", alex_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -311,7 +313,8 @@ { "events": {"signal": "morgan_x"}, "update": "morgan_x[0] === morgan_x[1] ? null : invert(\"x\", morgan_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -368,7 +371,8 @@ { "events": {"signal": "morgan_y"}, "update": "morgan_y[0] === morgan_y[1] ? null : invert(\"y\", morgan_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_composition_or.vg.json b/examples/compiled/selection_composition_or.vg.json index 4baef286f5..603e52cb36 100644 --- a/examples/compiled/selection_composition_or.vg.json +++ b/examples/compiled/selection_composition_or.vg.json @@ -92,7 +92,8 @@ { "events": {"signal": "alex_x"}, "update": "alex_x[0] === alex_x[1] ? null : invert(\"x\", alex_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -149,7 +150,8 @@ { "events": {"signal": "alex_y"}, "update": "alex_y[0] === alex_y[1] ? null : invert(\"y\", alex_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -311,7 +313,8 @@ { "events": {"signal": "morgan_x"}, "update": "morgan_x[0] === morgan_x[1] ? null : invert(\"x\", morgan_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -368,7 +371,8 @@ { "events": {"signal": "morgan_y"}, "update": "morgan_y[0] === morgan_y[1] ? null : invert(\"y\", morgan_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_concat.vg.json b/examples/compiled/selection_concat.vg.json index d9bf62b2fd..0ee27cf45a 100644 --- a/examples/compiled/selection_concat.vg.json +++ b/examples/compiled/selection_concat.vg.json @@ -115,6 +115,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -174,6 +178,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_0_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -494,6 +502,10 @@ { "events": [{"signal": "grid_Displacement || grid_Acceleration"}], "update": "grid_Displacement && grid_Acceleration ? {unit: \"concat_1\", fields: grid_tuple_fields, values: [grid_Displacement,grid_Acceleration]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json index c883e8ed94..bc3bbf1d20 100644 --- a/examples/compiled/selection_filter.vg.json +++ b/examples/compiled/selection_filter.vg.json @@ -112,6 +112,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -171,6 +175,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_0_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json index fd1832b3cd..cdcb7e8bbf 100644 --- a/examples/compiled/selection_filter_composition.vg.json +++ b/examples/compiled/selection_filter_composition.vg.json @@ -112,6 +112,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -171,6 +175,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_0_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_interval_mark_style.vg.json b/examples/compiled/selection_interval_mark_style.vg.json index a501b7f145..0967cee44f 100644 --- a/examples/compiled/selection_interval_mark_style.vg.json +++ b/examples/compiled/selection_interval_mark_style.vg.json @@ -92,7 +92,8 @@ { "events": {"signal": "alex_x"}, "update": "alex_x[0] === alex_x[1] ? null : invert(\"x\", alex_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -149,7 +150,8 @@ { "events": {"signal": "alex_y"}, "update": "alex_y[0] === alex_y[1] ? null : invert(\"y\", alex_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -311,7 +313,8 @@ { "events": {"signal": "morgan_x"}, "update": "morgan_x[0] === morgan_x[1] ? null : invert(\"x\", morgan_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -368,7 +371,8 @@ { "events": {"signal": "morgan_y"}, "update": "morgan_y[0] === morgan_y[1] ? null : invert(\"y\", morgan_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_layer_bar_month.vg.json b/examples/compiled/selection_layer_bar_month.vg.json index fe3ad074a3..67764b4e87 100644 --- a/examples/compiled/selection_layer_bar_month.vg.json +++ b/examples/compiled/selection_layer_bar_month.vg.json @@ -120,7 +120,8 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index 111316024f..3be064b1c9 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -91,7 +91,8 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -150,7 +151,8 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -275,8 +277,7 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_binned_interval.vg.json b/examples/compiled/selection_project_binned_interval.vg.json index 7858bf9501..046c459bfd 100644 --- a/examples/compiled/selection_project_binned_interval.vg.json +++ b/examples/compiled/selection_project_binned_interval.vg.json @@ -140,7 +140,8 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval.vg.json b/examples/compiled/selection_project_interval.vg.json index 5ad377cecc..7748dc7a90 100644 --- a/examples/compiled/selection_project_interval.vg.json +++ b/examples/compiled/selection_project_interval.vg.json @@ -87,7 +87,8 @@ { "events": {"signal": "pts_x"}, "update": "pts_x[0] === pts_x[1] ? null : invert(\"x\", pts_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -141,7 +142,8 @@ { "events": {"signal": "pts_y"}, "update": "pts_y[0] === pts_y[1] ? null : invert(\"y\", pts_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_x.vg.json b/examples/compiled/selection_project_interval_x.vg.json index aee48e52f1..f3ade9e7ed 100644 --- a/examples/compiled/selection_project_interval_x.vg.json +++ b/examples/compiled/selection_project_interval_x.vg.json @@ -87,7 +87,8 @@ { "events": {"signal": "pts_x"}, "update": "pts_x[0] === pts_x[1] ? null : invert(\"x\", pts_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_x_y.vg.json b/examples/compiled/selection_project_interval_x_y.vg.json index 5ad377cecc..7748dc7a90 100644 --- a/examples/compiled/selection_project_interval_x_y.vg.json +++ b/examples/compiled/selection_project_interval_x_y.vg.json @@ -87,7 +87,8 @@ { "events": {"signal": "pts_x"}, "update": "pts_x[0] === pts_x[1] ? null : invert(\"x\", pts_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -141,7 +142,8 @@ { "events": {"signal": "pts_y"}, "update": "pts_y[0] === pts_y[1] ? null : invert(\"y\", pts_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_interval_y.vg.json b/examples/compiled/selection_project_interval_y.vg.json index d0f4b87ba0..290e54055f 100644 --- a/examples/compiled/selection_project_interval_y.vg.json +++ b/examples/compiled/selection_project_interval_y.vg.json @@ -87,7 +87,8 @@ { "events": {"signal": "pts_y"}, "update": "pts_y[0] === pts_y[1] ? null : invert(\"y\", pts_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_project_multi.vg.json b/examples/compiled/selection_project_multi.vg.json index c281a6bfd5..725eb8ffe1 100644 --- a/examples/compiled/selection_project_multi.vg.json +++ b/examples/compiled/selection_project_multi.vg.json @@ -48,8 +48,7 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_multi_cylinders.vg.json b/examples/compiled/selection_project_multi_cylinders.vg.json index 6ae2ab4f93..be937900d2 100644 --- a/examples/compiled/selection_project_multi_cylinders.vg.json +++ b/examples/compiled/selection_project_multi_cylinders.vg.json @@ -50,8 +50,7 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_multi_cylinders_origin.vg.json b/examples/compiled/selection_project_multi_cylinders_origin.vg.json index cde4c821df..423de36dbd 100644 --- a/examples/compiled/selection_project_multi_cylinders_origin.vg.json +++ b/examples/compiled/selection_project_multi_cylinders_origin.vg.json @@ -53,8 +53,7 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_multi_origin.vg.json b/examples/compiled/selection_project_multi_origin.vg.json index 8d892ecffb..a0846f01db 100644 --- a/examples/compiled/selection_project_multi_origin.vg.json +++ b/examples/compiled/selection_project_multi_origin.vg.json @@ -47,8 +47,7 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_resolution_global.vg.json b/examples/compiled/selection_resolution_global.vg.json index 60134d84f3..147da9a78b 100644 --- a/examples/compiled/selection_resolution_global.vg.json +++ b/examples/compiled/selection_resolution_global.vg.json @@ -174,6 +174,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -233,6 +237,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -584,6 +592,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -643,6 +655,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -992,6 +1008,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1332,6 +1352,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1391,6 +1415,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1742,6 +1770,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2082,6 +2114,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2141,6 +2177,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2490,6 +2530,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2830,6 +2874,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2889,6 +2937,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3240,6 +3292,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -3299,6 +3355,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_intersect.vg.json b/examples/compiled/selection_resolution_intersect.vg.json index 303e7264c8..3b1b23955d 100644 --- a/examples/compiled/selection_resolution_intersect.vg.json +++ b/examples/compiled/selection_resolution_intersect.vg.json @@ -177,6 +177,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -236,6 +240,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -539,6 +547,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -598,6 +610,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -899,6 +915,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1191,6 +1211,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1250,6 +1274,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1553,6 +1581,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1845,6 +1877,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1904,6 +1940,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2205,6 +2245,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2497,6 +2541,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2556,6 +2604,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2859,6 +2911,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2918,6 +2974,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_union.vg.json b/examples/compiled/selection_resolution_union.vg.json index 42b44b24f2..4f137bc37f 100644 --- a/examples/compiled/selection_resolution_union.vg.json +++ b/examples/compiled/selection_resolution_union.vg.json @@ -177,6 +177,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -236,6 +240,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -539,6 +547,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -598,6 +610,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -899,6 +915,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1191,6 +1211,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1250,6 +1274,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1553,6 +1581,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1845,6 +1877,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -1904,6 +1940,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2205,6 +2245,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2497,6 +2541,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2556,6 +2604,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2859,6 +2911,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -2918,6 +2974,10 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_y\", brush_y)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/selection_toggle_altKey.vg.json b/examples/compiled/selection_toggle_altKey.vg.json index 887a381692..c961b599c4 100644 --- a/examples/compiled/selection_toggle_altKey.vg.json +++ b/examples/compiled/selection_toggle_altKey.vg.json @@ -54,8 +54,7 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.altKey" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json index d94df94a03..f74203a5d1 100644 --- a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json @@ -54,8 +54,7 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.altKey && event.shiftKey" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_toggle_shiftKey.vg.json b/examples/compiled/selection_toggle_shiftKey.vg.json index cdfe362ac6..3b66071198 100644 --- a/examples/compiled/selection_toggle_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_shiftKey.vg.json @@ -54,8 +54,7 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json index b212c185a8..ec232f0e70 100644 --- a/examples/compiled/selection_translate_brush_drag.vg.json +++ b/examples/compiled/selection_translate_brush_drag.vg.json @@ -84,7 +84,8 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -143,7 +144,8 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json index a418a3c464..6e64bcb7e7 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.vg.json +++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json @@ -84,7 +84,8 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -143,7 +144,8 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_drag.vg.json b/examples/compiled/selection_translate_scatterplot_drag.vg.json index 367aa26054..7e6f909072 100644 --- a/examples/compiled/selection_translate_scatterplot_drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_drag.vg.json @@ -62,7 +62,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json index 114f00e49c..691b6df670 100644 --- a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json @@ -62,7 +62,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_interval.vg.json b/examples/compiled/selection_type_interval.vg.json index 5ad377cecc..7748dc7a90 100644 --- a/examples/compiled/selection_type_interval.vg.json +++ b/examples/compiled/selection_type_interval.vg.json @@ -87,7 +87,8 @@ { "events": {"signal": "pts_x"}, "update": "pts_x[0] === pts_x[1] ? null : invert(\"x\", pts_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -141,7 +142,8 @@ { "events": {"signal": "pts_y"}, "update": "pts_y[0] === pts_y[1] ? null : invert(\"y\", pts_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_interval_invert.vg.json b/examples/compiled/selection_type_interval_invert.vg.json index 42d31f0ddd..38e5c77289 100644 --- a/examples/compiled/selection_type_interval_invert.vg.json +++ b/examples/compiled/selection_type_interval_invert.vg.json @@ -87,7 +87,8 @@ { "events": {"signal": "pts_x"}, "update": "pts_x[0] === pts_x[1] ? null : invert(\"x\", pts_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -141,7 +142,8 @@ { "events": {"signal": "pts_y"}, "update": "pts_y[0] === pts_y[1] ? null : invert(\"y\", pts_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_type_multi.vg.json b/examples/compiled/selection_type_multi.vg.json index 3d7abebe9a..9ade4cce13 100644 --- a/examples/compiled/selection_type_multi.vg.json +++ b/examples/compiled/selection_type_multi.vg.json @@ -57,8 +57,7 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json index 0fd861910e..64caff02de 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json @@ -84,7 +84,8 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -143,7 +144,8 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json index b212c185a8..ec232f0e70 100644 --- a/examples/compiled/selection_zoom_brush_wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_wheel.vg.json @@ -84,7 +84,8 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { @@ -143,7 +144,8 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json index 39670b3416..e7e9f5b85e 100644 --- a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json @@ -62,7 +62,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json index 367aa26054..7e6f909072 100644 --- a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json @@ -62,7 +62,8 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ] }, { diff --git a/examples/compiled/trellis_selections.vg.json b/examples/compiled/trellis_selections.vg.json index 40b3b4f83d..3b81f1173a 100644 --- a/examples/compiled/trellis_selections.vg.json +++ b/examples/compiled/trellis_selections.vg.json @@ -201,6 +201,10 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, @@ -351,6 +355,10 @@ { "events": [{"signal": "grid_X || grid_Y"}], "update": "grid_X && grid_Y ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: grid_tuple_fields, values: [grid_X,grid_Y]} : null" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "null" } ] }, diff --git a/examples/compiled/vconcat_flatten.vg.json b/examples/compiled/vconcat_flatten.vg.json index 204d7dc928..b26d282838 100644 --- a/examples/compiled/vconcat_flatten.vg.json +++ b/examples/compiled/vconcat_flatten.vg.json @@ -120,10 +120,6 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, From 1a3ec0c13ac571be5a97b65a7a2b3095c25af7d4 Mon Sep 17 00:00:00 2001 From: Arvind Satyanarayan Date: Fri, 5 Apr 2019 17:12:04 -0400 Subject: [PATCH 27/36] Minor fixes to clear logic/style to minimize signal additions. --- src/compile/selection/transforms/clear.ts | 50 +++++++++++-------- test/compile/selection/clear.test.ts | 61 +++++++++++++---------- 2 files changed, 66 insertions(+), 45 deletions(-) diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index 21ad3a65ad..108c044310 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -1,35 +1,45 @@ -import {NewSignal, Update} from 'vega'; +import {Update} from 'vega'; import {selector as parseSelector} from 'vega-event-selector'; import {TUPLE} from '..'; import {TransformCompiler} from './transforms'; const clear: TransformCompiler = { has: selCmpt => { - return selCmpt.clear === false ? false : true; + return selCmpt.clear !== false; }, signals: (model, selCmpt, signals) => { - const trigger = selCmpt['on'] === 'mouseover' ? 'mouseout' : 'dblclick'; + const on = selCmpt.events[0].type; + const trigger = on === 'mouseover' ? 'mouseout' : 'dblclick'; const events = selCmpt.clear ? parseSelector(selCmpt.clear, 'scope') : parseSelector(trigger, 'scope'); - selCmpt.project.forEach(proj => { - const d_idx = signals.findIndex(n => n.name === proj.signals.data); - const v_idx = signals.findIndex(n => n.name === proj.signals.visual); - addClear(d_idx, signals, events, 'null'); - addClear(v_idx, signals, events, '[0, 0]'); - }); - const t_idx = signals.findIndex(n => n.name === selCmpt.name + TUPLE); - addClear(t_idx, signals, events, 'null'); + + function addClear(idx: number, update: Update) { + if (idx !== -1 && signals[idx].on) { + signals[idx].on.push({ + events: events, + update: update + }); + } + } + + // Be as minimalist as possible when adding clear triggers to minimize dataflow execution. + if (selCmpt.type === 'interval') { + selCmpt.project.forEach(proj => { + const vIdx = signals.findIndex(n => n.name === proj.signals.visual); + addClear(vIdx, '[0, 0]'); + + if (vIdx === -1) { + const dIdx = signals.findIndex(n => n.name === proj.signals.data); + addClear(dIdx, 'null'); + } + }); + } else { + const tIdx = signals.findIndex(n => n.name === selCmpt.name + TUPLE); + addClear(tIdx, 'null'); + } + return signals; } }; export default clear; - -function addClear(idx: number, signals: NewSignal[], events: any[], update: Update) { - if (idx !== -1 && signals[idx].on) { - signals[idx].on.push({ - events: events, - update: update - }); - } -} diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts index 97f3f1f49a..2e1359cb2b 100644 --- a/test/compile/selection/clear.test.ts +++ b/test/compile/selection/clear.test.ts @@ -125,12 +125,7 @@ describe('Clear selection transform, interval type', () => { model.parseScale(); const selCmpts = (model.component.selection = parseUnitSelection(model, { one: {type: 'interval', encodings: ['x', 'y'], bind: 'scales', translate: false, zoom: false}, - two: { - type: 'interval', - on: '[mousedown[event.shiftKey], window:mouseup] > window:mousemove!', - translate: false, - zoom: false - }, + two: {type: 'interval', translate: false, zoom: false}, three: {type: 'interval', encodings: ['x', 'y'], clear: false, translate: false, zoom: false} })); @@ -162,20 +157,6 @@ describe('Clear selection transform, interval type', () => { update: 'null' } ] - }, - { - name: 'one_tuple', - on: [ - { - events: [{signal: 'one_Horsepower || one_Miles_per_Gallon'}], - update: - 'one_Horsepower && one_Miles_per_Gallon ? {unit: "", fields: one_tuple_fields, values: [one_Horsepower,one_Miles_per_Gallon]} : null' - }, - { - events: parseSelector('dblclick', 'scope'), - update: 'null' - } - ] } ]) ); @@ -187,16 +168,46 @@ describe('Clear selection transform, interval type', () => { expect(twoSg).toEqual( expect.arrayContaining([ { - name: 'two_tuple', + name: 'two_x', + value: [], + on: [ + { + events: parseSelector('mousedown', 'scope')[0], + update: '[x(unit), x(unit)]' + }, + { + events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0], + update: '[two_x[0], clamp(x(unit), 0, width)]' + }, + { + events: {signal: 'two_scale_trigger'}, + update: '[scale("x", two_Horsepower[0]), scale("x", two_Horsepower[1])]' + }, + { + events: parseSelector('dblclick', 'scope'), + update: '[0, 0]' + } + ] + }, + { + name: 'two_y', + value: [], on: [ { - events: [{signal: 'two_Horsepower || two_Miles_per_Gallon'}], - update: - 'two_Horsepower && two_Miles_per_Gallon ? {unit: "", fields: two_tuple_fields, values: [two_Horsepower,two_Miles_per_Gallon]} : null' + events: parseSelector('mousedown', 'scope')[0], + update: '[y(unit), y(unit)]' + }, + { + events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0], + update: '[two_y[0], clamp(y(unit), 0, height)]' + }, + { + events: {signal: 'two_scale_trigger'}, + update: '[scale("y", two_Miles_per_Gallon[0]), scale("y", two_Miles_per_Gallon[1])]' }, { events: parseSelector('dblclick', 'scope'), - update: 'null' + update: '[0, 0]' } ] } From 053f24be8fc7f52ed205a2f717a02069c9a7bf92 Mon Sep 17 00:00:00 2001 From: Arvind Satyanarayan Date: Fri, 5 Apr 2019 17:36:32 -0400 Subject: [PATCH 28/36] Append clear to top-level signals to account for input bindings. --- src/compile/selection/parse.ts | 6 ++++ src/compile/selection/transforms/clear.ts | 25 ++++++++++------ test/compile/selection/clear.test.ts | 36 +++++++++++++++++++---- 3 files changed, 52 insertions(+), 15 deletions(-) diff --git a/src/compile/selection/parse.ts b/src/compile/selection/parse.ts index 5405c2b27c..ce15d7728a 100644 --- a/src/compile/selection/parse.ts +++ b/src/compile/selection/parse.ts @@ -42,6 +42,12 @@ export function parseUnitSelection(model: UnitModel, selDefs: Dict } } + // Define "clear" defaults here as it depends on "on". + if (selDef.clear !== false) { + const trigger = selDef.on === 'mouseover' ? 'mouseout' : 'dblclick'; + selDef.clear = parseSelector(selDef.clear || trigger, 'scope'); + } + name = varName(name); const selCmpt = (selCmpts[name] = { ...selDef, diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index 108c044310..153bbc5076 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -1,6 +1,7 @@ import {Update} from 'vega'; -import {selector as parseSelector} from 'vega-event-selector'; import {TUPLE} from '..'; +import {varName} from '../../../util'; +import inputBindings from './inputs'; import {TransformCompiler} from './transforms'; const clear: TransformCompiler = { @@ -8,17 +9,23 @@ const clear: TransformCompiler = { return selCmpt.clear !== false; }, - signals: (model, selCmpt, signals) => { - const on = selCmpt.events[0].type; - const trigger = on === 'mouseover' ? 'mouseout' : 'dblclick'; - const events = selCmpt.clear ? parseSelector(selCmpt.clear, 'scope') : parseSelector(trigger, 'scope'); + topLevelSignals: (model, selCmpt, signals) => { + if (inputBindings.has(selCmpt)) { + selCmpt.project.forEach(proj => { + const idx = signals.findIndex(n => n.name === varName(`${selCmpt.name}_${proj.field}`)); + if (idx !== -1) { + signals[idx].on.push({events: selCmpt.clear, update: 'null'}); + } + }); + } + return signals; + }, + + signals: (model, selCmpt, signals) => { function addClear(idx: number, update: Update) { if (idx !== -1 && signals[idx].on) { - signals[idx].on.push({ - events: events, - update: update - }); + signals[idx].on.push({events: selCmpt.clear, update}); } } diff --git a/test/compile/selection/clear.test.ts b/test/compile/selection/clear.test.ts index 2e1359cb2b..b08dda5502 100644 --- a/test/compile/selection/clear.test.ts +++ b/test/compile/selection/clear.test.ts @@ -1,7 +1,7 @@ /* tslint:disable quotemark */ import {selector as parseSelector} from 'vega-event-selector'; -import {assembleUnitSelectionSignals} from '../../../src/compile/selection/assemble'; +import {assembleTopLevelSignals} from '../../../src/compile/selection/assemble'; import interval from '../../../src/compile/selection/interval'; import multi from '../../../src/compile/selection/multi'; import {parseUnitSelection} from '../../../src/compile/selection/parse'; @@ -26,7 +26,14 @@ describe('Clear selection transform, single and multi types', () => { three: {type: 'single', clear: 'mouseout'}, four: {type: 'multi', clear: 'mouseout'}, five: {type: 'single', clear: false}, - six: {type: 'multi', clear: false} + six: {type: 'multi', clear: false}, + seven: { + type: 'single', + fields: ['Year'], + bind: { + Year: {input: 'range', min: 1970, max: 1980, step: 1} + } + } })); it('identifies transform invocation', () => { @@ -85,7 +92,7 @@ describe('Clear selection transform, single and multi types', () => { 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: three_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: parseSelector(selCmpts['three'].clear, 'scope'), update: 'null'} + {events: parseSelector('mouseout', 'scope'), update: 'null'} ] } ]); @@ -102,13 +109,30 @@ describe('Clear selection transform, single and multi types', () => { 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: four_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["_vgsid_"]]} : null', force: true }, - {events: parseSelector(selCmpts['four'].clear, 'scope'), update: 'null'} + {events: parseSelector('mouseout', 'scope'), update: 'null'} ] } ]); - const signals = assembleUnitSelectionSignals(model, []); - expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg])); + expect(assembleTopLevelSignals(model, [])).toEqual( + expect.arrayContaining([ + { + name: 'seven_Year', + value: null, + on: [ + { + events: [{source: 'scope', type: 'click'}], + update: 'datum && item().mark.marktype !== \'group\' ? datum["Year"] : null' + }, + { + events: [{source: 'scope', type: 'dblclick'}], + update: 'null' + } + ], + bind: {input: 'range', min: 1970, max: 1980, step: 1} + } + ]) + ); }); }); From 519a2b6c68afb7fdfc16deb09d62b7fdc3cd02d5 Mon Sep 17 00:00:00 2001 From: Arvind Satyanarayan Date: Fri, 5 Apr 2019 18:09:55 -0400 Subject: [PATCH 29/36] Refine documentation on selection clearing. --- examples/specs/selection_clear_brush.vl.json | 20 +++++++ .../specs/selection_clear_heatmap.vl.json | 52 +++++++++++++++++++ .../selection_type_single_mouseover.vl.json | 19 +++++++ site/docs/selection/clear.md | 23 ++++---- site/docs/selection/selection.md | 4 +- src/selection.ts | 15 +++--- 6 files changed, 112 insertions(+), 21 deletions(-) create mode 100644 examples/specs/selection_clear_brush.vl.json create mode 100644 examples/specs/selection_clear_heatmap.vl.json create mode 100644 examples/specs/selection_type_single_mouseover.vl.json diff --git a/examples/specs/selection_clear_brush.vl.json b/examples/specs/selection_clear_brush.vl.json new file mode 100644 index 0000000000..58bda8840a --- /dev/null +++ b/examples/specs/selection_clear_brush.vl.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://vega.github.io/schema/vega-lite/v3.json", + "data": {"url": "data/cars.json"}, + "selection": { + "brush": { + "type": "interval", + "init": {"x": [55, 160], "y": [13, 37]}, + "clear": "mouseup" + } + }, + "mark": "point", + "encoding": { + "x": {"field": "Horsepower", "type": "quantitative"}, + "y": {"field": "Miles_per_Gallon", "type": "quantitative"}, + "color": { + "condition": {"selection": "brush", "field": "Cylinders", "type": "ordinal"}, + "value": "grey" + } + } +} diff --git a/examples/specs/selection_clear_heatmap.vl.json b/examples/specs/selection_clear_heatmap.vl.json new file mode 100644 index 0000000000..833f1ad284 --- /dev/null +++ b/examples/specs/selection_clear_heatmap.vl.json @@ -0,0 +1,52 @@ +{ + "data": { + "values": [ + {"actual": "A", "predicted": "A", "count": 13}, + {"actual": "A", "predicted": "B", "count": 0}, + {"actual": "A", "predicted": "C", "count": 0}, + {"actual": "B", "predicted": "A", "count": 0}, + {"actual": "B", "predicted": "B", "count": 10}, + {"actual": "B", "predicted": "C", "count": 6}, + {"actual": "C", "predicted": "A", "count": 0}, + {"actual": "C", "predicted": "B", "count": 0}, + {"actual": "C", "predicted": "C", "count": 9} + ] + }, + "selection": { + "highlight": {"type": "single"} + }, + "mark": "bar", + "encoding": { + "y": { + "field": "actual", + "type": "nominal" + }, + "x": { + "field": "predicted", + "type": "nominal" + }, + "color": { + "field": "count", + "type": "quantitative", + "scale": {"scheme": "plasma"} + }, + "fillOpacity": { + "condition": {"selection": "highlight", "value": 1}, + "value": 0.5 + } + }, + "config": { + "axis": { + "zindex": 0 + }, + "scale": { + "bandPaddingInner": 0, + "bandPaddingOuter": 0 + }, + "range": { + "ramp": { + "scheme": "yellowgreenblue" + } + } + } +} diff --git a/examples/specs/selection_type_single_mouseover.vl.json b/examples/specs/selection_type_single_mouseover.vl.json new file mode 100644 index 0000000000..7016f0cacd --- /dev/null +++ b/examples/specs/selection_type_single_mouseover.vl.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://vega.github.io/schema/vega-lite/v3.json", + "data": {"url": "data/cars.json"}, + "selection": { + "pts": {"type": "single", "on": "mouseover"} + }, + "mark": "rect", + "encoding": { + "y": {"field": "Origin", "type": "ordinal"}, + "x": {"field": "Cylinders", "type": "ordinal"}, + "color": { + "condition": { + "selection": "pts", + "aggregate": "count", "type": "quantitative" + }, + "value": "grey" + } + } +} diff --git a/site/docs/selection/clear.md b/site/docs/selection/clear.md index 2667da26f8..657735bd01 100644 --- a/site/docs/selection/clear.md +++ b/site/docs/selection/clear.md @@ -5,24 +5,25 @@ title: Clearing a selection permalink: /docs/clear.html --- -The `clear` selection transformation clears all selections made on the visualization: - -- For `single` and `multi` selections, it will clear all selected values. -- For `interval` selections, it will clear all selected values and return the visualization to its original scale domain. +The `clear` property identifies which events must fire to empty a selection of all selected values (the [`empty`](https://vega.github.io/vega-lite/docs/selection.html#selection-properties) can be used to further determine the behavior of empty selections). It can take one of the following values: -- `false` -- disables clear behavior; there will be no trigger that resets the visualization to its initial configuration. -- A [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) to indicate which events should trigger clearing of the visualization. +- `false` -- disables clear behavior; there will be no event trigger that empties a selection. +- A [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) to indicate which events should trigger clearing the selection. -Vega-Lite automatically adds a clear transform to all selections by default. The default is `clear: mouseout` if you're `on: mouseover`, else `clear: dblclick`. +Vega-Lite automatically adds the clear property to all selections by default. If the selection is triggered by mouse hovers (i.e., `"on": "mouseover"), then`"clear": "mouseout"`is used. For all other selection triggers,`"clear": "dblclick"` is used. ## Examples -Mousing out of the visualization will clear your highlighted value. +The following visualization demonstrates the default clearing behavior: select a square on click and clear out the selection on double click. + +
+ +The following example clears the brush when the mouse button is released. -
+
-Click and drag to shift the current position of the scales, then double click to reset the scales to their initial configuration. +Note, in the above example, clearing out the selection does _not_ reset it to its initial value. Instead, when the mouse button is released, the selection is emptied of all values. This behavior is subtly different to when the selection is [bound to scales](https://vega.github.io/vega-lite/docs/bind.html#scale-binding) -- clearing the selection out now resets the view to use the initial scale domains. Try it out below: pan and zoom the plot, and then double click. -
+
diff --git a/site/docs/selection/selection.md b/site/docs/selection/selection.md index b24cfcc723..13386b0cd0 100644 --- a/site/docs/selection/selection.md +++ b/site/docs/selection/selection.md @@ -57,9 +57,9 @@ While selection types provide useful defaults, it can often be useful to overrid {% include table.html props="on,init,empty,resolve,mark" source="IntervalSelection" %} -For instance, with the `on` property, a single rectangle in the heatmap below can now be selected on double-click instead. +For instance, with the `on` property, a single rectangle in the heatmap below can now be selected on mouse hover instead. -
+
{:#interval-mark} diff --git a/src/selection.ts b/src/selection.ts index f97c878f2f..9ed9b043c8 100644 --- a/src/selection.ts +++ b/src/selection.ts @@ -50,7 +50,7 @@ export interface BaseSelectionDef { fields?: string[]; /** - * By default, all data values are considered to lie within an empty selection. + * 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'; @@ -58,8 +58,8 @@ export interface BaseSelectionDef { export interface SingleSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Clears all selected values. Can be an - * [EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`. + * Clears the selection, emptying it of all values. Can be an + * [EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable. * * __Default value:__ `mouseout` if `on: mouseover` else `dblclick`. * @@ -92,8 +92,8 @@ export interface SingleSelectionConfig extends BaseSelectionDef { export interface MultiSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Clears all selected values. Can be an - * [EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`. + * Clears the selection, emptying it of all values. Can be an + * [EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable. * * __Default value:__ `mouseout` if `on: mouseover` else `dblclick`. * @@ -169,9 +169,8 @@ export interface BrushConfig { export interface IntervalSelectionConfig extends BaseSelectionDef { /** - * Controls clearing selections. Clears all selected values and returns the visualization - * to its original scale domains. Can be an - * [EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`. + * Clears the selection, emptying it of all values. Can be an + * [EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable. * * __Default value:__ `mouseout` if `on: mouseover` else `dblclick`. * From 6b81dd2159c53c88936b7ff035b7447e3f0779a5 Mon Sep 17 00:00:00 2001 From: Arvind Satyanarayan Date: Fri, 5 Apr 2019 18:31:33 -0400 Subject: [PATCH 30/36] Selection clearing should account for toggling. --- src/compile/selection/transforms/clear.ts | 8 +++++++- src/compile/selection/transforms/toggle.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/compile/selection/transforms/clear.ts b/src/compile/selection/transforms/clear.ts index 153bbc5076..342fc5e9bb 100644 --- a/src/compile/selection/transforms/clear.ts +++ b/src/compile/selection/transforms/clear.ts @@ -2,6 +2,7 @@ import {Update} from 'vega'; import {TUPLE} from '..'; import {varName} from '../../../util'; import inputBindings from './inputs'; +import toggle, {TOGGLE} from './toggle'; import {TransformCompiler} from './transforms'; const clear: TransformCompiler = { @@ -41,8 +42,13 @@ const clear: TransformCompiler = { } }); } else { - const tIdx = signals.findIndex(n => n.name === selCmpt.name + TUPLE); + let tIdx = signals.findIndex(n => n.name === selCmpt.name + TUPLE); addClear(tIdx, 'null'); + + if (toggle.has(selCmpt)) { + tIdx = signals.findIndex(n => n.name === selCmpt.name + TOGGLE); + addClear(tIdx, 'false'); + } } return signals; diff --git a/src/compile/selection/transforms/toggle.ts b/src/compile/selection/transforms/toggle.ts index 269f726653..fa179ab33a 100644 --- a/src/compile/selection/transforms/toggle.ts +++ b/src/compile/selection/transforms/toggle.ts @@ -1,7 +1,7 @@ import {TUPLE, unitName} from '..'; import {TransformCompiler} from './transforms'; -const TOGGLE = '_toggle'; +export const TOGGLE = '_toggle'; const toggle: TransformCompiler = { has: selCmpt => { From b99ef92ca182dcdd0733007471af7448ed878ee5 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 5 Apr 2019 22:38:12 +0000 Subject: [PATCH 31/36] [Travis] Update schema (build: 22868) --- build/vega-lite-schema.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index e17f31badb..e3a767562a 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -6472,10 +6472,10 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Clears all selected values and returns the visualization\nto its original scale domains. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." + "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { - "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", + "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ "all", "none" @@ -6557,10 +6557,10 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Clears all selected values and returns the visualization\nto its original scale domains. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." + "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { - "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", + "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ "all", "none" @@ -8505,10 +8505,10 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Clears all selected values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." + "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { - "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", + "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ "all", "none" @@ -8586,10 +8586,10 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Clears all selected values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." + "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { - "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", + "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ "all", "none" @@ -10340,10 +10340,10 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Clears all selected values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." + "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { - "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", + "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ "all", "none" @@ -10418,10 +10418,10 @@ "type": "boolean" } ], - "description": "Controls clearing selections. Clears all selected values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false`.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." + "description": "Clears the selection, emptying it of all values. Can be an\n[EventStream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `mouseout` if `on: mouseover` else `dblclick`.\n\nSee the [clear](https://vega.github.io/vega-lite/docs/clear.html) documentation for more information." }, "empty": { - "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", + "description": "By default, `all` data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", "enum": [ "all", "none" From f6e9a88925e7a175f9ccc162eed62868cdd2081d Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 5 Apr 2019 22:41:26 +0000 Subject: [PATCH 32/36] [Travis] Update examples (build: 22868) --- examples/compiled/brush_table.vg.json | 12 - .../circle_bubble_health_income.vg.json | 3 +- .../compiled/interactive_area_brush.vg.json | 6 +- .../interactive_bar_select_highlight.vg.json | 3 +- examples/compiled/interactive_brush.vg.json | 9 +- .../interactive_dashboard_europe_pop.vg.json | 28 -- .../interactive_layered_crossfilter.vg.json | 24 - ...ctive_layered_crossfilter_discrete.vg.json | 12 + .../interactive_overview_detail.vg.json | 8 - .../compiled/interactive_paintbrush.vg.json | 3 +- .../interactive_paintbrush_color.vg.json | 3 +- ...teractive_paintbrush_color_nearest.vg.json | 3 +- .../interactive_paintbrush_interval.vg.json | 9 +- .../interactive_paintbrush_simple_all.vg.json | 3 +- ...interactive_paintbrush_simple_none.vg.json | 3 +- .../interactive_panzoom_splom.vg.json | 36 -- ...interactive_panzoom_vconcat_shared.vg.json | 4 - .../interactive_query_widgets.vg.json | 6 +- .../interactive_seattle_weather.vg.json | 12 +- examples/compiled/interactive_splom.vg.json | 132 ------ examples/compiled/isotype_grid.vg.json | 9 +- .../compiled/selection_bind_cylyr.vg.json | 6 +- .../compiled/selection_bind_origin.vg.json | 3 +- .../compiled/selection_brush_timeunit.vg.json | 8 - examples/compiled/selection_clear_brush.svg | 1 + .../compiled/selection_clear_brush.vg.json | 444 ++++++++++++++++++ examples/compiled/selection_clear_heatmap.svg | 1 + .../compiled/selection_clear_heatmap.vg.json | 154 ++++++ .../selection_composition_and.vg.json | 18 +- .../compiled/selection_composition_or.vg.json | 18 +- examples/compiled/selection_concat.vg.json | 16 - examples/compiled/selection_filter.vg.json | 12 - .../selection_filter_composition.vg.json | 12 - .../selection_interval_mark_style.vg.json | 18 +- .../selection_layer_bar_month.vg.json | 6 +- .../selection_multi_condition.vg.json | 12 +- .../selection_project_binned_interval.vg.json | 6 +- .../selection_project_interval.vg.json | 9 +- .../selection_project_interval_x.vg.json | 6 +- .../selection_project_interval_x_y.vg.json | 9 +- .../selection_project_interval_y.vg.json | 6 +- .../compiled/selection_project_multi.vg.json | 3 +- .../selection_project_multi_cylinders.vg.json | 3 +- ...ion_project_multi_cylinders_origin.vg.json | 3 +- .../selection_project_multi_origin.vg.json | 3 +- .../selection_resolution_global.vg.json | 96 ---- .../selection_resolution_intersect.vg.json | 96 ---- .../selection_resolution_union.vg.json | 96 ---- .../compiled/selection_toggle_altKey.vg.json | 3 +- .../selection_toggle_altKey_shiftKey.vg.json | 3 +- .../selection_toggle_shiftKey.vg.json | 3 +- .../selection_translate_brush_drag.vg.json | 9 +- ...lection_translate_brush_shift-drag.vg.json | 9 +- ...lection_translate_scatterplot_drag.vg.json | 3 +- ...n_translate_scatterplot_shift-drag.vg.json | 3 +- .../compiled/selection_type_interval.vg.json | 9 +- .../selection_type_interval_invert.vg.json | 9 +- .../compiled/selection_type_multi.vg.json | 3 +- .../selection_type_single_mouseover.svg | 1 + .../selection_type_single_mouseover.vg.json | 137 ++++++ .../selection_zoom_brush_shift-wheel.vg.json | 9 +- .../selection_zoom_brush_wheel.vg.json | 9 +- ...ction_zoom_scatterplot_shift-wheel.vg.json | 3 +- .../selection_zoom_scatterplot_wheel.vg.json | 3 +- examples/compiled/trellis_selections.vg.json | 15 +- examples/compiled/vconcat_flatten.vg.json | 4 + 66 files changed, 869 insertions(+), 759 deletions(-) create mode 100644 examples/compiled/selection_clear_brush.svg create mode 100644 examples/compiled/selection_clear_brush.vg.json create mode 100644 examples/compiled/selection_clear_heatmap.svg create mode 100644 examples/compiled/selection_clear_heatmap.vg.json create mode 100644 examples/compiled/selection_type_single_mouseover.svg create mode 100644 examples/compiled/selection_type_single_mouseover.vg.json diff --git a/examples/compiled/brush_table.vg.json b/examples/compiled/brush_table.vg.json index 680d42611d..5384d8a76d 100644 --- a/examples/compiled/brush_table.vg.json +++ b/examples/compiled/brush_table.vg.json @@ -149,10 +149,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -212,10 +208,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_0_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -237,10 +229,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/circle_bubble_health_income.vg.json b/examples/compiled/circle_bubble_health_income.vg.json index 742702dcc7..9b1f4449db 100644 --- a/examples/compiled/circle_bubble_health_income.vg.json +++ b/examples/compiled/circle_bubble_health_income.vg.json @@ -63,8 +63,7 @@ { "events": [{"signal": "view_income || view_health"}], "update": "view_income && view_health ? {unit: \"\", fields: view_tuple_fields, values: [view_income,view_health]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_area_brush.vg.json b/examples/compiled/interactive_area_brush.vg.json index 456e99ff69..e60b629ac5 100644 --- a/examples/compiled/interactive_area_brush.vg.json +++ b/examples/compiled/interactive_area_brush.vg.json @@ -118,8 +118,7 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -138,8 +137,7 @@ { "events": [{"signal": "brush_yearmonth_date"}], "update": "brush_yearmonth_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_yearmonth_date]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_bar_select_highlight.vg.json b/examples/compiled/interactive_bar_select_highlight.vg.json index b5f7c79909..9bf85379d6 100644 --- a/examples/compiled/interactive_bar_select_highlight.vg.json +++ b/examples/compiled/interactive_bar_select_highlight.vg.json @@ -90,7 +90,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "false"} ] }, { diff --git a/examples/compiled/interactive_brush.vg.json b/examples/compiled/interactive_brush.vg.json index 978b29371b..5907a50c5f 100644 --- a/examples/compiled/interactive_brush.vg.json +++ b/examples/compiled/interactive_brush.vg.json @@ -86,8 +86,7 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -147,8 +146,7 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -168,8 +166,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_dashboard_europe_pop.vg.json b/examples/compiled/interactive_dashboard_europe_pop.vg.json index 57972bac88..8fdafa196b 100644 --- a/examples/compiled/interactive_dashboard_europe_pop.vg.json +++ b/examples/compiled/interactive_dashboard_europe_pop.vg.json @@ -422,10 +422,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_0_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -445,10 +441,6 @@ { "events": [{"signal": "brush_Country"}], "update": "brush_Country ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Country]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -744,10 +736,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_1_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -767,10 +755,6 @@ { "events": [{"signal": "brush_Country"}], "update": "brush_Country ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_Country]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1069,10 +1053,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_2_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1132,10 +1112,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_2_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1159,10 +1135,6 @@ } ], "update": "brush_Population_ages_65_and_above_of_total && brush_Population_ages_15_64_of_total ? {unit: \"concat_2\", fields: brush_tuple_fields, values: [brush_Population_ages_65_and_above_of_total,brush_Population_ages_15_64_of_total]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter.vg.json b/examples/compiled/interactive_layered_crossfilter.vg.json index 0bf8847383..154ecc04d5 100644 --- a/examples/compiled/interactive_layered_crossfilter.vg.json +++ b/examples/compiled/interactive_layered_crossfilter.vg.json @@ -258,10 +258,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_column_distance_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -281,10 +277,6 @@ { "events": [{"signal": "brush_distance"}], "update": "brush_distance ? {unit: \"child__repeat_column_distance_layer_0\", fields: brush_tuple_fields, values: [brush_distance]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -634,10 +626,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_column_delay_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -657,10 +645,6 @@ { "events": [{"signal": "brush_delay"}], "update": "brush_delay ? {unit: \"child__repeat_column_delay_layer_0\", fields: brush_tuple_fields, values: [brush_delay]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1010,10 +994,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_column_time_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1033,10 +1013,6 @@ { "events": [{"signal": "brush_time"}], "update": "brush_time ? {unit: \"child__repeat_column_time_layer_0\", fields: brush_tuple_fields, values: [brush_time]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json index 8de466f0c4..c992166c4c 100644 --- a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json +++ b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json @@ -227,6 +227,10 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "false" } ] }, @@ -385,6 +389,10 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "false" } ] }, @@ -543,6 +551,10 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "false" } ] }, diff --git a/examples/compiled/interactive_overview_detail.vg.json b/examples/compiled/interactive_overview_detail.vg.json index a69c2844a2..4160adc0e0 100644 --- a/examples/compiled/interactive_overview_detail.vg.json +++ b/examples/compiled/interactive_overview_detail.vg.json @@ -174,10 +174,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_1_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -197,10 +193,6 @@ { "events": [{"signal": "brush_date"}], "update": "brush_date ? {unit: \"concat_1\", fields: brush_tuple_fields, values: [brush_date]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_paintbrush.vg.json b/examples/compiled/interactive_paintbrush.vg.json index 903c654250..65c43d30e4 100644 --- a/examples/compiled/interactive_paintbrush.vg.json +++ b/examples/compiled/interactive_paintbrush.vg.json @@ -55,7 +55,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "mouseout"}], "update": "false"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_color.vg.json b/examples/compiled/interactive_paintbrush_color.vg.json index 066aabc3e4..6485d3bf0f 100644 --- a/examples/compiled/interactive_paintbrush_color.vg.json +++ b/examples/compiled/interactive_paintbrush_color.vg.json @@ -55,7 +55,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "mouseout"}], "update": "false"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_color_nearest.vg.json b/examples/compiled/interactive_paintbrush_color_nearest.vg.json index b081a05d69..67d0db2fb9 100644 --- a/examples/compiled/interactive_paintbrush_color_nearest.vg.json +++ b/examples/compiled/interactive_paintbrush_color_nearest.vg.json @@ -55,7 +55,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "mouseout"}], "update": "false"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_interval.vg.json b/examples/compiled/interactive_paintbrush_interval.vg.json index 284771975e..87afb23e1b 100644 --- a/examples/compiled/interactive_paintbrush_interval.vg.json +++ b/examples/compiled/interactive_paintbrush_interval.vg.json @@ -88,8 +88,7 @@ { "events": {"signal": "paintbrush_x"}, "update": "paintbrush_x[0] === paintbrush_x[1] ? null : invert(\"x\", paintbrush_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -148,8 +147,7 @@ { "events": {"signal": "paintbrush_y"}, "update": "paintbrush_y[0] === paintbrush_y[1] ? null : invert(\"y\", paintbrush_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -170,8 +168,7 @@ {"signal": "paintbrush_Horsepower || paintbrush_Miles_per_Gallon"} ], "update": "paintbrush_Horsepower && paintbrush_Miles_per_Gallon ? {unit: \"\", fields: paintbrush_tuple_fields, values: [paintbrush_Horsepower,paintbrush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_all.vg.json b/examples/compiled/interactive_paintbrush_simple_all.vg.json index a6b2b77197..2cfbb57bc0 100644 --- a/examples/compiled/interactive_paintbrush_simple_all.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_all.vg.json @@ -54,7 +54,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "mouseout"}], "update": "false"} ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_none.vg.json b/examples/compiled/interactive_paintbrush_simple_none.vg.json index d80e0d3d66..531b0d817c 100644 --- a/examples/compiled/interactive_paintbrush_simple_none.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_none.vg.json @@ -54,7 +54,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "mouseout"}], "update": "false"} ] }, { diff --git a/examples/compiled/interactive_panzoom_splom.vg.json b/examples/compiled/interactive_panzoom_splom.vg.json index 02291f2069..fc28564598 100644 --- a/examples/compiled/interactive_panzoom_splom.vg.json +++ b/examples/compiled/interactive_panzoom_splom.vg.json @@ -168,10 +168,6 @@ {"signal": "grid_Miles_per_Gallon || grid_Horsepower"} ], "update": "grid_Miles_per_Gallon && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -362,10 +358,6 @@ { "events": [{"signal": "grid_Acceleration || grid_Horsepower"}], "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -538,10 +530,6 @@ { "events": [{"signal": "grid_Horsepower"}], "update": "grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -731,10 +719,6 @@ {"signal": "grid_Miles_per_Gallon || grid_Acceleration"} ], "update": "grid_Miles_per_Gallon && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -907,10 +891,6 @@ { "events": [{"signal": "grid_Acceleration"}], "update": "grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1098,10 +1078,6 @@ { "events": [{"signal": "grid_Horsepower || grid_Acceleration"}], "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1274,10 +1250,6 @@ { "events": [{"signal": "grid_Miles_per_Gallon"}], "update": "grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1467,10 +1439,6 @@ {"signal": "grid_Acceleration || grid_Miles_per_Gallon"} ], "update": "grid_Acceleration && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1663,10 +1631,6 @@ {"signal": "grid_Horsepower || grid_Miles_per_Gallon"} ], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json index 0c3c1138ec..a1645806fd 100644 --- a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json +++ b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json @@ -101,10 +101,6 @@ {"signal": "region_Horsepower || region_Miles_per_Gallon"} ], "update": "region_Horsepower && region_Miles_per_Gallon ? {unit: \"concat_0\", fields: region_tuple_fields, values: [region_Horsepower,region_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/interactive_query_widgets.vg.json b/examples/compiled/interactive_query_widgets.vg.json index 6a549842fe..acf3319b51 100644 --- a/examples/compiled/interactive_query_widgets.vg.json +++ b/examples/compiled/interactive_query_widgets.vg.json @@ -56,7 +56,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? datum[\"Year\"] : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ], "bind": {"input": "range", "min": 1969, "max": 1981, "step": 1} }, @@ -67,7 +68,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? datum[\"Cylinders\"] : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ], "bind": {"input": "range", "min": 3, "max": 8, "step": 1} }, diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index d73802ebfe..752bdc9770 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -141,10 +141,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -164,10 +160,6 @@ { "events": [{"signal": "brush_monthdate_date"}], "update": "brush_monthdate_date ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_monthdate_date]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -453,6 +445,10 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "false" } ] }, diff --git a/examples/compiled/interactive_splom.vg.json b/examples/compiled/interactive_splom.vg.json index 087b704931..9678757cb8 100644 --- a/examples/compiled/interactive_splom.vg.json +++ b/examples/compiled/interactive_splom.vg.json @@ -187,10 +187,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -252,10 +248,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -284,10 +276,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -423,10 +411,6 @@ {"signal": "grid_Miles_per_Gallon || grid_Horsepower"} ], "update": "grid_Miles_per_Gallon && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -702,10 +686,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -767,10 +747,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -797,10 +773,6 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -934,10 +906,6 @@ { "events": [{"signal": "grid_Acceleration || grid_Horsepower"}], "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1213,10 +1181,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1240,10 +1204,6 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1356,10 +1316,6 @@ { "events": [{"signal": "grid_Horsepower"}], "update": "grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1629,10 +1585,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1694,10 +1646,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1726,10 +1674,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1865,10 +1809,6 @@ {"signal": "grid_Miles_per_Gallon || grid_Acceleration"} ], "update": "grid_Miles_per_Gallon && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon,grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2144,10 +2084,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2171,10 +2107,6 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2287,10 +2219,6 @@ { "events": [{"signal": "grid_Acceleration"}], "update": "grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2560,10 +2488,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2625,10 +2549,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2655,10 +2575,6 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2792,10 +2708,6 @@ { "events": [{"signal": "grid_Horsepower || grid_Acceleration"}], "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3071,10 +2983,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3098,10 +3006,6 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3214,10 +3118,6 @@ { "events": [{"signal": "grid_Miles_per_Gallon"}], "update": "grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: grid_tuple_fields, values: [grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3487,10 +3387,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3552,10 +3448,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3584,10 +3476,6 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3723,10 +3611,6 @@ {"signal": "grid_Acceleration || grid_Miles_per_Gallon"} ], "update": "grid_Acceleration && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -4002,10 +3886,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -4067,10 +3947,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -4099,10 +3975,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -4238,10 +4110,6 @@ {"signal": "grid_Horsepower || grid_Miles_per_Gallon"} ], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/isotype_grid.vg.json b/examples/compiled/isotype_grid.vg.json index 88fe3d8596..9719096392 100644 --- a/examples/compiled/isotype_grid.vg.json +++ b/examples/compiled/isotype_grid.vg.json @@ -183,8 +183,7 @@ { "events": {"signal": "highlight_x"}, "update": "highlight_x[0] === highlight_x[1] ? null : invert(\"x\", highlight_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -240,8 +239,7 @@ { "events": {"signal": "highlight_y"}, "update": "highlight_y[0] === highlight_y[1] ? null : invert(\"y\", highlight_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -260,8 +258,7 @@ { "events": [{"signal": "highlight_col || highlight_row"}], "update": "highlight_col && highlight_row ? {unit: \"\", fields: highlight_tuple_fields, values: [highlight_col,highlight_row]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_bind_cylyr.vg.json b/examples/compiled/selection_bind_cylyr.vg.json index c2ca4c5008..34cbb4e241 100644 --- a/examples/compiled/selection_bind_cylyr.vg.json +++ b/examples/compiled/selection_bind_cylyr.vg.json @@ -35,7 +35,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? datum[\"Year\"] : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ], "bind": {"input": "range", "min": 1969, "max": 1981, "step": 1} }, @@ -46,7 +47,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? datum[\"Cylinders\"] : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ], "bind": {"input": "range", "min": 3, "max": 8, "step": 1} }, diff --git a/examples/compiled/selection_bind_origin.vg.json b/examples/compiled/selection_bind_origin.vg.json index 19a770bd22..427dc287a9 100644 --- a/examples/compiled/selection_bind_origin.vg.json +++ b/examples/compiled/selection_bind_origin.vg.json @@ -34,7 +34,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "datum && item().mark.marktype !== 'group' ? datum[\"Origin\"] : null" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} ], "bind": {"input": "select", "options": [null, "Europe", "Japan", "USA"]} }, diff --git a/examples/compiled/selection_brush_timeunit.vg.json b/examples/compiled/selection_brush_timeunit.vg.json index 6cd5dea6a3..933d6d21e8 100644 --- a/examples/compiled/selection_brush_timeunit.vg.json +++ b/examples/compiled/selection_brush_timeunit.vg.json @@ -138,10 +138,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -161,10 +157,6 @@ { "events": [{"signal": "brush_seconds_date"}], "update": "brush_seconds_date ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_seconds_date]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_clear_brush.svg b/examples/compiled/selection_clear_brush.svg new file mode 100644 index 0000000000..09151706ad --- /dev/null +++ b/examples/compiled/selection_clear_brush.svg @@ -0,0 +1 @@ +34568Cylinders050100150200Horsepower01020304050Miles_per_Gallon \ No newline at end of file diff --git a/examples/compiled/selection_clear_brush.vg.json b/examples/compiled/selection_clear_brush.vg.json new file mode 100644 index 0000000000..25bb8ea589 --- /dev/null +++ b/examples/compiled/selection_clear_brush.vg.json @@ -0,0 +1,444 @@ +{ + "$schema": "https://vega.github.io/schema/vega/v5.json", + "autosize": "pad", + "padding": 5, + "width": 200, + "height": 200, + "style": "cell", + "data": [ + {"name": "brush_store"}, + { + "name": "source_0", + "url": "data/cars.json", + "format": {"type": "json"}, + "transform": [ + { + "type": "filter", + "expr": "datum[\"Horsepower\"] !== null && !isNaN(datum[\"Horsepower\"]) && datum[\"Miles_per_Gallon\"] !== null && !isNaN(datum[\"Miles_per_Gallon\"])" + } + ] + } + ], + "signals": [ + { + "name": "unit", + "value": {}, + "on": [ + {"events": "mousemove", "update": "isTuple(group()) ? group() : unit"} + ] + }, + {"name": "brush", "update": "vlSelectionResolve(\"brush_store\")"}, + { + "name": "brush_x", + "init": "[scale(\"x\", 55), scale(\"x\", 160)]", + "on": [ + { + "events": { + "source": "scope", + "type": "mousedown", + "filter": [ + "!event.item || event.item.mark.name !== \"brush_brush\"" + ] + }, + "update": "[x(unit), x(unit)]" + }, + { + "events": { + "source": "window", + "type": "mousemove", + "consume": true, + "between": [ + { + "source": "scope", + "type": "mousedown", + "filter": [ + "!event.item || event.item.mark.name !== \"brush_brush\"" + ] + }, + {"source": "window", "type": "mouseup"} + ] + }, + "update": "[brush_x[0], clamp(x(unit), 0, width)]" + }, + { + "events": {"signal": "brush_scale_trigger"}, + "update": "[scale(\"x\", brush_Horsepower[0]), scale(\"x\", brush_Horsepower[1])]" + }, + { + "events": {"signal": "brush_translate_delta"}, + "update": "clampRange(panLinear(brush_translate_anchor.extent_x, brush_translate_delta.x / span(brush_translate_anchor.extent_x)), 0, width)" + }, + { + "events": {"signal": "brush_zoom_delta"}, + "update": "clampRange(zoomLinear(brush_x, brush_zoom_anchor.x, brush_zoom_delta), 0, width)" + }, + {"events": [{"source": "scope", "type": "mouseup"}], "update": "[0, 0]"} + ] + }, + { + "name": "brush_Horsepower", + "init": "[55, 160]", + "on": [ + { + "events": {"signal": "brush_x"}, + "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" + } + ] + }, + { + "name": "brush_y", + "init": "[scale(\"y\", 13), scale(\"y\", 37)]", + "on": [ + { + "events": { + "source": "scope", + "type": "mousedown", + "filter": [ + "!event.item || event.item.mark.name !== \"brush_brush\"" + ] + }, + "update": "[y(unit), y(unit)]" + }, + { + "events": { + "source": "window", + "type": "mousemove", + "consume": true, + "between": [ + { + "source": "scope", + "type": "mousedown", + "filter": [ + "!event.item || event.item.mark.name !== \"brush_brush\"" + ] + }, + {"source": "window", "type": "mouseup"} + ] + }, + "update": "[brush_y[0], clamp(y(unit), 0, height)]" + }, + { + "events": {"signal": "brush_scale_trigger"}, + "update": "[scale(\"y\", brush_Miles_per_Gallon[0]), scale(\"y\", brush_Miles_per_Gallon[1])]" + }, + { + "events": {"signal": "brush_translate_delta"}, + "update": "clampRange(panLinear(brush_translate_anchor.extent_y, brush_translate_delta.y / span(brush_translate_anchor.extent_y)), 0, height)" + }, + { + "events": {"signal": "brush_zoom_delta"}, + "update": "clampRange(zoomLinear(brush_y, brush_zoom_anchor.y, brush_zoom_delta), 0, height)" + }, + {"events": [{"source": "scope", "type": "mouseup"}], "update": "[0, 0]"} + ] + }, + { + "name": "brush_Miles_per_Gallon", + "init": "[13, 37]", + "on": [ + { + "events": {"signal": "brush_y"}, + "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" + } + ] + }, + { + "name": "brush_scale_trigger", + "value": {}, + "on": [ + { + "events": [{"scale": "x"}, {"scale": "y"}], + "update": "(!isArray(brush_Horsepower) || (+invert(\"x\", brush_x)[0] === +brush_Horsepower[0] && +invert(\"x\", brush_x)[1] === +brush_Horsepower[1])) && (!isArray(brush_Miles_per_Gallon) || (+invert(\"y\", brush_y)[0] === +brush_Miles_per_Gallon[0] && +invert(\"y\", brush_y)[1] === +brush_Miles_per_Gallon[1])) ? brush_scale_trigger : {}" + } + ] + }, + { + "name": "brush_tuple", + "init": "{unit: \"\", fields: brush_tuple_fields, values: [[55, 160], [13, 37]]}", + "on": [ + { + "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], + "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" + } + ] + }, + { + "name": "brush_tuple_fields", + "value": [ + {"field": "Horsepower", "channel": "x", "type": "R"}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + ] + }, + { + "name": "brush_translate_anchor", + "value": {}, + "on": [ + { + "events": [ + {"source": "scope", "type": "mousedown", "markname": "brush_brush"} + ], + "update": "{x: x(unit), y: y(unit), extent_x: slice(brush_x), extent_y: slice(brush_y)}" + } + ] + }, + { + "name": "brush_translate_delta", + "value": {}, + "on": [ + { + "events": [ + { + "source": "window", + "type": "mousemove", + "consume": true, + "between": [ + { + "source": "scope", + "type": "mousedown", + "markname": "brush_brush" + }, + {"source": "window", "type": "mouseup"} + ] + } + ], + "update": "{x: brush_translate_anchor.x - x(unit), y: brush_translate_anchor.y - y(unit)}" + } + ] + }, + { + "name": "brush_zoom_anchor", + "on": [ + { + "events": [ + { + "source": "scope", + "type": "wheel", + "consume": true, + "markname": "brush_brush" + } + ], + "update": "{x: x(unit), y: y(unit)}" + } + ] + }, + { + "name": "brush_zoom_delta", + "on": [ + { + "events": [ + { + "source": "scope", + "type": "wheel", + "consume": true, + "markname": "brush_brush" + } + ], + "force": true, + "update": "pow(1.001, event.deltaY * pow(16, event.deltaMode))" + } + ] + }, + { + "name": "brush_modify", + "update": "modify(\"brush_store\", brush_tuple, true)" + } + ], + "marks": [ + { + "name": "brush_brush_bg", + "type": "rect", + "clip": true, + "encode": { + "enter": {"fill": {"value": "#333"}, "fillOpacity": {"value": 0.125}}, + "update": { + "x": [ + { + "test": "data(\"brush_store\").length && data(\"brush_store\")[0].unit === \"\"", + "signal": "brush_x[0]" + }, + {"value": 0} + ], + "y": [ + { + "test": "data(\"brush_store\").length && data(\"brush_store\")[0].unit === \"\"", + "signal": "brush_y[0]" + }, + {"value": 0} + ], + "x2": [ + { + "test": "data(\"brush_store\").length && data(\"brush_store\")[0].unit === \"\"", + "signal": "brush_x[1]" + }, + {"value": 0} + ], + "y2": [ + { + "test": "data(\"brush_store\").length && data(\"brush_store\")[0].unit === \"\"", + "signal": "brush_y[1]" + }, + {"value": 0} + ] + } + } + }, + { + "name": "marks", + "type": "symbol", + "style": ["point"], + "from": {"data": "source_0"}, + "encode": { + "update": { + "opacity": {"value": 0.7}, + "fill": {"value": "transparent"}, + "stroke": [ + { + "test": "!(length(data(\"brush_store\"))) || (vlSelectionTest(\"brush_store\", datum))", + "scale": "color", + "field": "Cylinders" + }, + {"value": "grey"} + ], + "tooltip": { + "signal": "{\"Horsepower\": format(datum[\"Horsepower\"], \"\"), \"Miles_per_Gallon\": format(datum[\"Miles_per_Gallon\"], \"\"), \"Cylinders\": ''+datum[\"Cylinders\"]}" + }, + "x": {"scale": "x", "field": "Horsepower"}, + "y": {"scale": "y", "field": "Miles_per_Gallon"} + } + } + }, + { + "name": "brush_brush", + "type": "rect", + "clip": true, + "encode": { + "enter": {"fill": {"value": "transparent"}}, + "update": { + "x": [ + { + "test": "data(\"brush_store\").length && data(\"brush_store\")[0].unit === \"\"", + "signal": "brush_x[0]" + }, + {"value": 0} + ], + "y": [ + { + "test": "data(\"brush_store\").length && data(\"brush_store\")[0].unit === \"\"", + "signal": "brush_y[0]" + }, + {"value": 0} + ], + "x2": [ + { + "test": "data(\"brush_store\").length && data(\"brush_store\")[0].unit === \"\"", + "signal": "brush_x[1]" + }, + {"value": 0} + ], + "y2": [ + { + "test": "data(\"brush_store\").length && data(\"brush_store\")[0].unit === \"\"", + "signal": "brush_y[1]" + }, + {"value": 0} + ], + "stroke": [ + { + "test": "brush_x[0] !== brush_x[1] && brush_y[0] !== brush_y[1]", + "value": "white" + }, + {"value": null} + ] + } + } + } + ], + "scales": [ + { + "name": "x", + "type": "linear", + "domain": {"data": "source_0", "field": "Horsepower"}, + "range": [0, {"signal": "width"}], + "nice": true, + "zero": true + }, + { + "name": "y", + "type": "linear", + "domain": {"data": "source_0", "field": "Miles_per_Gallon"}, + "range": [{"signal": "height"}, 0], + "nice": true, + "zero": true + }, + { + "name": "color", + "type": "ordinal", + "domain": {"data": "source_0", "field": "Cylinders", "sort": true}, + "range": "ordinal", + "interpolate": "hcl" + } + ], + "axes": [ + { + "scale": "x", + "orient": "bottom", + "grid": false, + "title": "Horsepower", + "labelFlush": true, + "labelOverlap": true, + "tickCount": {"signal": "ceil(width/40)"}, + "zindex": 1 + }, + { + "scale": "x", + "orient": "bottom", + "gridScale": "y", + "grid": true, + "tickCount": {"signal": "ceil(width/40)"}, + "domain": false, + "labels": false, + "maxExtent": 0, + "minExtent": 0, + "ticks": false, + "zindex": 0 + }, + { + "scale": "y", + "orient": "left", + "grid": false, + "title": "Miles_per_Gallon", + "labelOverlap": true, + "tickCount": {"signal": "ceil(height/40)"}, + "zindex": 1 + }, + { + "scale": "y", + "orient": "left", + "gridScale": "x", + "grid": true, + "tickCount": {"signal": "ceil(height/40)"}, + "domain": false, + "labels": false, + "maxExtent": 0, + "minExtent": 0, + "ticks": false, + "zindex": 0 + } + ], + "legends": [ + { + "stroke": "color", + "gradientLength": {"signal": "clamp(height, 64, 200)"}, + "symbolType": "circle", + "title": "Cylinders", + "encode": { + "symbols": { + "update": { + "fill": {"value": "transparent"}, + "opacity": {"value": 0.7} + } + } + } + } + ] +} diff --git a/examples/compiled/selection_clear_heatmap.svg b/examples/compiled/selection_clear_heatmap.svg new file mode 100644 index 0000000000..52179d482d --- /dev/null +++ b/examples/compiled/selection_clear_heatmap.svg @@ -0,0 +1 @@ +0510countABCpredictedABCactual \ No newline at end of file diff --git a/examples/compiled/selection_clear_heatmap.vg.json b/examples/compiled/selection_clear_heatmap.vg.json new file mode 100644 index 0000000000..bb51a3bb92 --- /dev/null +++ b/examples/compiled/selection_clear_heatmap.vg.json @@ -0,0 +1,154 @@ +{ + "$schema": "https://vega.github.io/schema/vega/v5.json", + "autosize": "pad", + "padding": 5, + "style": "cell", + "data": [ + {"name": "highlight_store"}, + { + "name": "source_0", + "values": [ + {"actual": "A", "predicted": "A", "count": 13}, + {"actual": "A", "predicted": "B", "count": 0}, + {"actual": "A", "predicted": "C", "count": 0}, + {"actual": "B", "predicted": "A", "count": 0}, + {"actual": "B", "predicted": "B", "count": 10}, + {"actual": "B", "predicted": "C", "count": 6}, + {"actual": "C", "predicted": "A", "count": 0}, + {"actual": "C", "predicted": "B", "count": 0}, + {"actual": "C", "predicted": "C", "count": 9} + ] + }, + { + "name": "data_0", + "source": "source_0", + "transform": [ + {"type": "identifier", "as": "_vgsid_"}, + { + "type": "filter", + "expr": "datum[\"count\"] !== null && !isNaN(datum[\"count\"])" + } + ] + } + ], + "signals": [ + {"name": "x_step", "value": 20}, + {"name": "width", "update": "bandspace(domain('x').length, 0, 0) * x_step"}, + {"name": "y_step", "value": 20}, + { + "name": "height", + "update": "bandspace(domain('y').length, 0, 0) * y_step" + }, + { + "name": "unit", + "value": {}, + "on": [ + {"events": "mousemove", "update": "isTuple(group()) ? group() : unit"} + ] + }, + {"name": "highlight", "update": "vlSelectionResolve(\"highlight_store\")"}, + { + "name": "highlight_tuple", + "on": [ + { + "events": [{"source": "scope", "type": "click"}], + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: highlight_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "force": true + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + ] + }, + { + "name": "highlight_tuple_fields", + "value": [{"type": "E", "field": "_vgsid_"}] + }, + { + "name": "highlight_modify", + "update": "modify(\"highlight_store\", highlight_tuple, true)" + } + ], + "marks": [ + { + "name": "marks", + "type": "rect", + "style": ["bar"], + "from": {"data": "data_0"}, + "encode": { + "update": { + "fill": {"scale": "color", "field": "count"}, + "fillOpacity": [ + { + "test": "!(length(data(\"highlight_store\"))) || (vlSelectionTest(\"highlight_store\", datum))", + "value": 1 + }, + {"value": 0.5} + ], + "tooltip": { + "signal": "{\"actual\": ''+datum[\"actual\"], \"predicted\": ''+datum[\"predicted\"], \"count\": format(datum[\"count\"], \"\")}" + }, + "x": {"scale": "x", "field": "predicted"}, + "width": {"scale": "x", "band": true}, + "y": {"scale": "y", "field": "actual"}, + "height": {"scale": "y", "band": true} + } + } + } + ], + "scales": [ + { + "name": "x", + "type": "band", + "domain": {"data": "data_0", "field": "predicted", "sort": true}, + "range": {"step": {"signal": "x_step"}}, + "paddingInner": 0, + "paddingOuter": 0 + }, + { + "name": "y", + "type": "band", + "domain": {"data": "data_0", "field": "actual", "sort": true}, + "range": {"step": {"signal": "y_step"}}, + "paddingInner": 0, + "paddingOuter": 0 + }, + { + "name": "color", + "type": "linear", + "domain": {"data": "data_0", "field": "count"}, + "range": {"scheme": "plasma"}, + "interpolate": "hcl", + "zero": false + } + ], + "axes": [ + { + "scale": "x", + "orient": "bottom", + "grid": false, + "title": "predicted", + "labelAlign": "right", + "labelAngle": 270, + "labelBaseline": "middle", + "zindex": 1 + }, + { + "scale": "y", + "orient": "left", + "grid": false, + "title": "actual", + "zindex": 1 + } + ], + "legends": [ + { + "fill": "color", + "gradientLength": {"signal": "clamp(height, 64, 200)"}, + "symbolType": "circle", + "title": "count" + } + ], + "config": { + "axis": {"zindex": 0}, + "range": {"ramp": {"scheme": "yellowgreenblue"}} + } +} diff --git a/examples/compiled/selection_composition_and.vg.json b/examples/compiled/selection_composition_and.vg.json index 7bea2ac49b..81e1131323 100644 --- a/examples/compiled/selection_composition_and.vg.json +++ b/examples/compiled/selection_composition_and.vg.json @@ -92,8 +92,7 @@ { "events": {"signal": "alex_x"}, "update": "alex_x[0] === alex_x[1] ? null : invert(\"x\", alex_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -150,8 +149,7 @@ { "events": {"signal": "alex_y"}, "update": "alex_y[0] === alex_y[1] ? null : invert(\"y\", alex_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -170,8 +168,7 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -313,8 +310,7 @@ { "events": {"signal": "morgan_x"}, "update": "morgan_x[0] === morgan_x[1] ? null : invert(\"x\", morgan_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -371,8 +367,7 @@ { "events": {"signal": "morgan_y"}, "update": "morgan_y[0] === morgan_y[1] ? null : invert(\"y\", morgan_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -391,8 +386,7 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_composition_or.vg.json b/examples/compiled/selection_composition_or.vg.json index 603e52cb36..91905a1503 100644 --- a/examples/compiled/selection_composition_or.vg.json +++ b/examples/compiled/selection_composition_or.vg.json @@ -92,8 +92,7 @@ { "events": {"signal": "alex_x"}, "update": "alex_x[0] === alex_x[1] ? null : invert(\"x\", alex_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -150,8 +149,7 @@ { "events": {"signal": "alex_y"}, "update": "alex_y[0] === alex_y[1] ? null : invert(\"y\", alex_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -170,8 +168,7 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -313,8 +310,7 @@ { "events": {"signal": "morgan_x"}, "update": "morgan_x[0] === morgan_x[1] ? null : invert(\"x\", morgan_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -371,8 +367,7 @@ { "events": {"signal": "morgan_y"}, "update": "morgan_y[0] === morgan_y[1] ? null : invert(\"y\", morgan_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -391,8 +386,7 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_concat.vg.json b/examples/compiled/selection_concat.vg.json index 0ee27cf45a..30bc900253 100644 --- a/examples/compiled/selection_concat.vg.json +++ b/examples/compiled/selection_concat.vg.json @@ -115,10 +115,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -178,10 +174,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_0_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -203,10 +195,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -502,10 +490,6 @@ { "events": [{"signal": "grid_Displacement || grid_Acceleration"}], "update": "grid_Displacement && grid_Acceleration ? {unit: \"concat_1\", fields: grid_tuple_fields, values: [grid_Displacement,grid_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json index bc3bbf1d20..33d44a8bc4 100644 --- a/examples/compiled/selection_filter.vg.json +++ b/examples/compiled/selection_filter.vg.json @@ -112,10 +112,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -175,10 +171,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_0_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -200,10 +192,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json index cdcb7e8bbf..fce9e7f2ab 100644 --- a/examples/compiled/selection_filter_composition.vg.json +++ b/examples/compiled/selection_filter_composition.vg.json @@ -112,10 +112,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"concat_0_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -175,10 +171,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"concat_0_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -200,10 +192,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_interval_mark_style.vg.json b/examples/compiled/selection_interval_mark_style.vg.json index 0967cee44f..944d98f9af 100644 --- a/examples/compiled/selection_interval_mark_style.vg.json +++ b/examples/compiled/selection_interval_mark_style.vg.json @@ -92,8 +92,7 @@ { "events": {"signal": "alex_x"}, "update": "alex_x[0] === alex_x[1] ? null : invert(\"x\", alex_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -150,8 +149,7 @@ { "events": {"signal": "alex_y"}, "update": "alex_y[0] === alex_y[1] ? null : invert(\"y\", alex_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -170,8 +168,7 @@ { "events": [{"signal": "alex_Cylinders || alex_Origin"}], "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -313,8 +310,7 @@ { "events": {"signal": "morgan_x"}, "update": "morgan_x[0] === morgan_x[1] ? null : invert(\"x\", morgan_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -371,8 +367,7 @@ { "events": {"signal": "morgan_y"}, "update": "morgan_y[0] === morgan_y[1] ? null : invert(\"y\", morgan_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -391,8 +386,7 @@ { "events": [{"signal": "morgan_Cylinders || morgan_Origin"}], "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_layer_bar_month.vg.json b/examples/compiled/selection_layer_bar_month.vg.json index 67764b4e87..88ef4d2ec2 100644 --- a/examples/compiled/selection_layer_bar_month.vg.json +++ b/examples/compiled/selection_layer_bar_month.vg.json @@ -120,8 +120,7 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -140,8 +139,7 @@ { "events": [{"signal": "brush_month_date"}], "update": "brush_month_date ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_month_date]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index 3be064b1c9..63d8ddb1b2 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -91,8 +91,7 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -151,8 +150,7 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -171,8 +169,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -277,7 +274,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "mouseout"}], "update": "false"} ] }, { diff --git a/examples/compiled/selection_project_binned_interval.vg.json b/examples/compiled/selection_project_binned_interval.vg.json index 046c459bfd..7ed03a5306 100644 --- a/examples/compiled/selection_project_binned_interval.vg.json +++ b/examples/compiled/selection_project_binned_interval.vg.json @@ -140,8 +140,7 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -160,8 +159,7 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"layer_0\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_interval.vg.json b/examples/compiled/selection_project_interval.vg.json index 7748dc7a90..5524d949dd 100644 --- a/examples/compiled/selection_project_interval.vg.json +++ b/examples/compiled/selection_project_interval.vg.json @@ -87,8 +87,7 @@ { "events": {"signal": "pts_x"}, "update": "pts_x[0] === pts_x[1] ? null : invert(\"x\", pts_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -142,8 +141,7 @@ { "events": {"signal": "pts_y"}, "update": "pts_y[0] === pts_y[1] ? null : invert(\"y\", pts_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -162,8 +160,7 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_interval_x.vg.json b/examples/compiled/selection_project_interval_x.vg.json index f3ade9e7ed..67770bc193 100644 --- a/examples/compiled/selection_project_interval_x.vg.json +++ b/examples/compiled/selection_project_interval_x.vg.json @@ -87,8 +87,7 @@ { "events": {"signal": "pts_x"}, "update": "pts_x[0] === pts_x[1] ? null : invert(\"x\", pts_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -107,8 +106,7 @@ { "events": [{"signal": "pts_Cylinders"}], "update": "pts_Cylinders ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_interval_x_y.vg.json b/examples/compiled/selection_project_interval_x_y.vg.json index 7748dc7a90..5524d949dd 100644 --- a/examples/compiled/selection_project_interval_x_y.vg.json +++ b/examples/compiled/selection_project_interval_x_y.vg.json @@ -87,8 +87,7 @@ { "events": {"signal": "pts_x"}, "update": "pts_x[0] === pts_x[1] ? null : invert(\"x\", pts_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -142,8 +141,7 @@ { "events": {"signal": "pts_y"}, "update": "pts_y[0] === pts_y[1] ? null : invert(\"y\", pts_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -162,8 +160,7 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_interval_y.vg.json b/examples/compiled/selection_project_interval_y.vg.json index 290e54055f..85bd4cbaa0 100644 --- a/examples/compiled/selection_project_interval_y.vg.json +++ b/examples/compiled/selection_project_interval_y.vg.json @@ -87,8 +87,7 @@ { "events": {"signal": "pts_y"}, "update": "pts_y[0] === pts_y[1] ? null : invert(\"y\", pts_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -107,8 +106,7 @@ { "events": [{"signal": "pts_Origin"}], "update": "pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_project_multi.vg.json b/examples/compiled/selection_project_multi.vg.json index 725eb8ffe1..8c32180187 100644 --- a/examples/compiled/selection_project_multi.vg.json +++ b/examples/compiled/selection_project_multi.vg.json @@ -48,7 +48,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "false"} ] }, { diff --git a/examples/compiled/selection_project_multi_cylinders.vg.json b/examples/compiled/selection_project_multi_cylinders.vg.json index be937900d2..b10e175d66 100644 --- a/examples/compiled/selection_project_multi_cylinders.vg.json +++ b/examples/compiled/selection_project_multi_cylinders.vg.json @@ -50,7 +50,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "false"} ] }, { diff --git a/examples/compiled/selection_project_multi_cylinders_origin.vg.json b/examples/compiled/selection_project_multi_cylinders_origin.vg.json index 423de36dbd..ce7ce32f2d 100644 --- a/examples/compiled/selection_project_multi_cylinders_origin.vg.json +++ b/examples/compiled/selection_project_multi_cylinders_origin.vg.json @@ -53,7 +53,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "false"} ] }, { diff --git a/examples/compiled/selection_project_multi_origin.vg.json b/examples/compiled/selection_project_multi_origin.vg.json index a0846f01db..509e38b836 100644 --- a/examples/compiled/selection_project_multi_origin.vg.json +++ b/examples/compiled/selection_project_multi_origin.vg.json @@ -47,7 +47,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "false"} ] }, { diff --git a/examples/compiled/selection_resolution_global.vg.json b/examples/compiled/selection_resolution_global.vg.json index 147da9a78b..0a3ab64b93 100644 --- a/examples/compiled/selection_resolution_global.vg.json +++ b/examples/compiled/selection_resolution_global.vg.json @@ -174,10 +174,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -237,10 +233,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -269,10 +261,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -592,10 +580,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -655,10 +639,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -685,10 +665,6 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1008,10 +984,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1035,10 +1007,6 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1352,10 +1320,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1415,10 +1379,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1447,10 +1407,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1770,10 +1726,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1797,10 +1749,6 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2114,10 +2062,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2177,10 +2121,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2207,10 +2147,6 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2530,10 +2466,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2557,10 +2489,6 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2874,10 +2802,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2937,10 +2861,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2969,10 +2889,6 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3292,10 +3208,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3355,10 +3267,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3387,10 +3295,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_intersect.vg.json b/examples/compiled/selection_resolution_intersect.vg.json index 3b1b23955d..2ec8223087 100644 --- a/examples/compiled/selection_resolution_intersect.vg.json +++ b/examples/compiled/selection_resolution_intersect.vg.json @@ -177,10 +177,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -240,10 +236,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -272,10 +264,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -547,10 +535,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -610,10 +594,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -640,10 +620,6 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -915,10 +891,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -942,10 +914,6 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1211,10 +1179,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1274,10 +1238,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1306,10 +1266,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1581,10 +1537,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1608,10 +1560,6 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1877,10 +1825,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1940,10 +1884,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1970,10 +1910,6 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2245,10 +2181,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2272,10 +2204,6 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2541,10 +2469,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2604,10 +2528,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2636,10 +2556,6 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2911,10 +2827,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2974,10 +2886,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3006,10 +2914,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_resolution_union.vg.json b/examples/compiled/selection_resolution_union.vg.json index 4f137bc37f..b5f07ae62c 100644 --- a/examples/compiled/selection_resolution_union.vg.json +++ b/examples/compiled/selection_resolution_union.vg.json @@ -177,10 +177,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -240,10 +236,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -272,10 +264,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Horsepower"} ], "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -547,10 +535,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -610,10 +594,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Acceleration_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -640,10 +620,6 @@ { "events": [{"signal": "brush_Acceleration || brush_Horsepower"}], "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -915,10 +891,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Horsepower__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -942,10 +914,6 @@ { "events": [{"signal": "brush_Horsepower"}], "update": "brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1211,10 +1179,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1274,10 +1238,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1306,10 +1266,6 @@ {"signal": "brush_Miles_per_Gallon || brush_Acceleration"} ], "update": "brush_Miles_per_Gallon && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1581,10 +1537,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1608,10 +1560,6 @@ { "events": [{"signal": "brush_Acceleration"}], "update": "brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1877,10 +1825,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1940,10 +1884,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Acceleration__repeat_column_Horsepower_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -1970,10 +1910,6 @@ { "events": [{"signal": "brush_Horsepower || brush_Acceleration"}], "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2245,10 +2181,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2272,10 +2204,6 @@ { "events": [{"signal": "brush_Miles_per_Gallon"}], "update": "brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2541,10 +2469,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2604,10 +2528,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2636,10 +2556,6 @@ {"signal": "brush_Acceleration || brush_Miles_per_Gallon"} ], "update": "brush_Acceleration && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2911,10 +2827,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -2974,10 +2886,6 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower_y\", brush_y)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -3006,10 +2914,6 @@ {"signal": "brush_Horsepower || brush_Miles_per_Gallon"} ], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/selection_toggle_altKey.vg.json b/examples/compiled/selection_toggle_altKey.vg.json index c961b599c4..783f727086 100644 --- a/examples/compiled/selection_toggle_altKey.vg.json +++ b/examples/compiled/selection_toggle_altKey.vg.json @@ -54,7 +54,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.altKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "false"} ] }, { diff --git a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json index f74203a5d1..77387cdb3d 100644 --- a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json @@ -54,7 +54,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.altKey && event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "false"} ] }, { diff --git a/examples/compiled/selection_toggle_shiftKey.vg.json b/examples/compiled/selection_toggle_shiftKey.vg.json index 3b66071198..1ab61805c5 100644 --- a/examples/compiled/selection_toggle_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_shiftKey.vg.json @@ -54,7 +54,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "false"} ] }, { diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json index ec232f0e70..bf5d23a5fc 100644 --- a/examples/compiled/selection_translate_brush_drag.vg.json +++ b/examples/compiled/selection_translate_brush_drag.vg.json @@ -84,8 +84,7 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -144,8 +143,7 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -164,8 +162,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json index 6e64bcb7e7..934740eaed 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.vg.json +++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json @@ -84,8 +84,7 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -144,8 +143,7 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -164,8 +162,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_drag.vg.json b/examples/compiled/selection_translate_scatterplot_drag.vg.json index 7e6f909072..367aa26054 100644 --- a/examples/compiled/selection_translate_scatterplot_drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_drag.vg.json @@ -62,8 +62,7 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json index 691b6df670..114f00e49c 100644 --- a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json @@ -62,8 +62,7 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_type_interval.vg.json b/examples/compiled/selection_type_interval.vg.json index 7748dc7a90..5524d949dd 100644 --- a/examples/compiled/selection_type_interval.vg.json +++ b/examples/compiled/selection_type_interval.vg.json @@ -87,8 +87,7 @@ { "events": {"signal": "pts_x"}, "update": "pts_x[0] === pts_x[1] ? null : invert(\"x\", pts_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -142,8 +141,7 @@ { "events": {"signal": "pts_y"}, "update": "pts_y[0] === pts_y[1] ? null : invert(\"y\", pts_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -162,8 +160,7 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_type_interval_invert.vg.json b/examples/compiled/selection_type_interval_invert.vg.json index 38e5c77289..42c97aef1c 100644 --- a/examples/compiled/selection_type_interval_invert.vg.json +++ b/examples/compiled/selection_type_interval_invert.vg.json @@ -87,8 +87,7 @@ { "events": {"signal": "pts_x"}, "update": "pts_x[0] === pts_x[1] ? null : invert(\"x\", pts_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -142,8 +141,7 @@ { "events": {"signal": "pts_y"}, "update": "pts_y[0] === pts_y[1] ? null : invert(\"y\", pts_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -162,8 +160,7 @@ { "events": [{"signal": "pts_Cylinders || pts_Origin"}], "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_type_multi.vg.json b/examples/compiled/selection_type_multi.vg.json index 9ade4cce13..e7951153ab 100644 --- a/examples/compiled/selection_type_multi.vg.json +++ b/examples/compiled/selection_type_multi.vg.json @@ -57,7 +57,8 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" - } + }, + {"events": [{"source": "scope", "type": "dblclick"}], "update": "false"} ] }, { diff --git a/examples/compiled/selection_type_single_mouseover.svg b/examples/compiled/selection_type_single_mouseover.svg new file mode 100644 index 0000000000..44e23cf4ba --- /dev/null +++ b/examples/compiled/selection_type_single_mouseover.svg @@ -0,0 +1 @@ +3108Count of Records34568CylindersEuropeJapanUSAOrigin \ No newline at end of file diff --git a/examples/compiled/selection_type_single_mouseover.vg.json b/examples/compiled/selection_type_single_mouseover.vg.json new file mode 100644 index 0000000000..3a481374c2 --- /dev/null +++ b/examples/compiled/selection_type_single_mouseover.vg.json @@ -0,0 +1,137 @@ +{ + "$schema": "https://vega.github.io/schema/vega/v5.json", + "autosize": "pad", + "padding": 5, + "style": "cell", + "data": [ + {"name": "pts_store"}, + { + "name": "source_0", + "url": "data/cars.json", + "format": {"type": "json"}, + "transform": [ + {"type": "identifier", "as": "_vgsid_"}, + { + "type": "aggregate", + "groupby": ["Origin", "Cylinders"], + "ops": ["count"], + "fields": [null], + "as": ["__count"] + }, + {"type": "identifier", "as": "_vgsid_"} + ] + } + ], + "signals": [ + {"name": "x_step", "value": 20}, + {"name": "width", "update": "bandspace(domain('x').length, 0, 0) * x_step"}, + {"name": "y_step", "value": 20}, + { + "name": "height", + "update": "bandspace(domain('y').length, 0, 0) * y_step" + }, + { + "name": "unit", + "value": {}, + "on": [ + {"events": "mousemove", "update": "isTuple(group()) ? group() : unit"} + ] + }, + {"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"}, + { + "name": "pts_tuple", + "on": [ + { + "events": [{"source": "scope", "type": "mouseover"}], + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "force": true + }, + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} + ] + }, + {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, + {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"} + ], + "marks": [ + { + "name": "marks", + "type": "rect", + "style": ["rect"], + "from": {"data": "source_0"}, + "encode": { + "update": { + "fill": [ + { + "test": "!(length(data(\"pts_store\"))) || (vlSelectionTest(\"pts_store\", datum))", + "scale": "color", + "field": "__count" + }, + {"value": "grey"} + ], + "tooltip": { + "signal": "{\"Origin\": ''+datum[\"Origin\"], \"Cylinders\": ''+datum[\"Cylinders\"], \"Count of Records\": format(datum[\"__count\"], \"\")}" + }, + "x": {"scale": "x", "field": "Cylinders"}, + "width": {"scale": "x", "band": true}, + "y": {"scale": "y", "field": "Origin"}, + "height": {"scale": "y", "band": true} + } + } + } + ], + "scales": [ + { + "name": "x", + "type": "band", + "domain": {"data": "source_0", "field": "Cylinders", "sort": true}, + "range": {"step": {"signal": "x_step"}}, + "paddingInner": 0, + "paddingOuter": 0 + }, + { + "name": "y", + "type": "band", + "domain": {"data": "source_0", "field": "Origin", "sort": true}, + "range": {"step": {"signal": "y_step"}}, + "paddingInner": 0, + "paddingOuter": 0 + }, + { + "name": "color", + "type": "linear", + "domain": {"data": "source_0", "field": "__count"}, + "range": "heatmap", + "interpolate": "hcl", + "zero": false + } + ], + "axes": [ + { + "scale": "x", + "orient": "bottom", + "grid": false, + "title": "Cylinders", + "labelAlign": "right", + "labelAngle": 270, + "labelBaseline": "middle", + "labelOverlap": true, + "zindex": 1 + }, + { + "scale": "y", + "orient": "left", + "grid": false, + "title": "Origin", + "labelOverlap": true, + "zindex": 1 + } + ], + "legends": [ + { + "fill": "color", + "gradientLength": {"signal": "clamp(height, 64, 200)"}, + "symbolType": "circle", + "title": "Count of Records" + } + ] +} diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json index 64caff02de..d870d74bde 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json @@ -84,8 +84,7 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -144,8 +143,7 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -164,8 +162,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json index ec232f0e70..bf5d23a5fc 100644 --- a/examples/compiled/selection_zoom_brush_wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_wheel.vg.json @@ -84,8 +84,7 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -144,8 +143,7 @@ { "events": {"signal": "brush_y"}, "update": "brush_y[0] === brush_y[1] ? null : invert(\"y\", brush_y)" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { @@ -164,8 +162,7 @@ { "events": [{"signal": "brush_Horsepower || brush_Miles_per_Gallon"}], "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json index e7e9f5b85e..39670b3416 100644 --- a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json @@ -62,8 +62,7 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json index 7e6f909072..367aa26054 100644 --- a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json @@ -62,8 +62,7 @@ { "events": [{"signal": "grid_Horsepower || grid_Miles_per_Gallon"}], "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null" - }, - {"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} + } ] }, { diff --git a/examples/compiled/trellis_selections.vg.json b/examples/compiled/trellis_selections.vg.json index 3b81f1173a..91e190265a 100644 --- a/examples/compiled/trellis_selections.vg.json +++ b/examples/compiled/trellis_selections.vg.json @@ -41,7 +41,8 @@ { "events": [{"source": "scope", "type": "mouseover"}], "update": "datum && item().mark.marktype !== 'group' ? (item().isVoronoi ? datum.datum : datum)[\"X\"] : null" - } + }, + {"events": [{"source": "scope", "type": "mouseout"}], "update": "null"} ], "bind": {"input": "number"} }, @@ -201,10 +202,6 @@ { "events": {"signal": "brush_x"}, "update": "brush_x[0] === brush_x[1] ? null : invert(\"x\", brush_x)" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -224,10 +221,6 @@ { "events": [{"signal": "brush_X"}], "update": "brush_X ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: brush_tuple_fields, values: [brush_X]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, @@ -355,10 +348,6 @@ { "events": [{"signal": "grid_X || grid_Y"}], "update": "grid_X && grid_Y ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: grid_tuple_fields, values: [grid_X,grid_Y]} : null" - }, - { - "events": [{"source": "scope", "type": "dblclick"}], - "update": "null" } ] }, diff --git a/examples/compiled/vconcat_flatten.vg.json b/examples/compiled/vconcat_flatten.vg.json index b26d282838..26173f8388 100644 --- a/examples/compiled/vconcat_flatten.vg.json +++ b/examples/compiled/vconcat_flatten.vg.json @@ -120,6 +120,10 @@ { "events": [{"source": "scope", "type": "click"}], "update": "event.shiftKey" + }, + { + "events": [{"source": "scope", "type": "dblclick"}], + "update": "false" } ] }, From 9455fb8a665f376e80bdeab7f19ae8b552642fbc Mon Sep 17 00:00:00 2001 From: Kanit Wongsuphasawat Date: Fri, 5 Apr 2019 20:48:07 -0700 Subject: [PATCH 33/36] Fix backticks --- site/docs/selection/clear.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/docs/selection/clear.md b/site/docs/selection/clear.md index 657735bd01..38b3ff584f 100644 --- a/site/docs/selection/clear.md +++ b/site/docs/selection/clear.md @@ -12,7 +12,7 @@ It can take one of the following values: - `false` -- disables clear behavior; there will be no event trigger that empties a selection. - A [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) to indicate which events should trigger clearing the selection. -Vega-Lite automatically adds the clear property to all selections by default. If the selection is triggered by mouse hovers (i.e., `"on": "mouseover"), then`"clear": "mouseout"`is used. For all other selection triggers,`"clear": "dblclick"` is used. +Vega-Lite automatically adds the clear property to all selections by default. If the selection is triggered by mouse hovers (i.e., `"on": "mouseover"`), then `"clear": "mouseout"`is used. For all other selection triggers,`"clear": "dblclick"` is used. ## Examples From e51e6ce407f55f84d9587f2a6f6d34db6d4bbbac Mon Sep 17 00:00:00 2001 From: Kanit Wongsuphasawat Date: Fri, 5 Apr 2019 20:57:31 -0700 Subject: [PATCH 34/36] Rename `selection_clear_heatmap` to `selection_heatmap` as it doesn't include explicit clear property --- .../{selection_clear_heatmap.svg => selection_heatmap.svg} | 0 ...election_clear_heatmap.vg.json => selection_heatmap.vg.json} | 0 ...election_clear_heatmap.vl.json => selection_heatmap.vl.json} | 0 site/docs/selection/clear.md | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) rename examples/compiled/{selection_clear_heatmap.svg => selection_heatmap.svg} (100%) rename examples/compiled/{selection_clear_heatmap.vg.json => selection_heatmap.vg.json} (100%) rename examples/specs/{selection_clear_heatmap.vl.json => selection_heatmap.vl.json} (100%) diff --git a/examples/compiled/selection_clear_heatmap.svg b/examples/compiled/selection_heatmap.svg similarity index 100% rename from examples/compiled/selection_clear_heatmap.svg rename to examples/compiled/selection_heatmap.svg diff --git a/examples/compiled/selection_clear_heatmap.vg.json b/examples/compiled/selection_heatmap.vg.json similarity index 100% rename from examples/compiled/selection_clear_heatmap.vg.json rename to examples/compiled/selection_heatmap.vg.json diff --git a/examples/specs/selection_clear_heatmap.vl.json b/examples/specs/selection_heatmap.vl.json similarity index 100% rename from examples/specs/selection_clear_heatmap.vl.json rename to examples/specs/selection_heatmap.vl.json diff --git a/site/docs/selection/clear.md b/site/docs/selection/clear.md index 38b3ff584f..b55ca35e4a 100644 --- a/site/docs/selection/clear.md +++ b/site/docs/selection/clear.md @@ -18,7 +18,7 @@ Vega-Lite automatically adds the clear property to all selections by default. If The following visualization demonstrates the default clearing behavior: select a square on click and clear out the selection on double click. -
+
The following example clears the brush when the mouse button is released. From 165d8ca13523d997b819f1d7e16b4b1501f7b3a4 Mon Sep 17 00:00:00 2001 From: Kanit Wongsuphasawat Date: Fri, 5 Apr 2019 21:14:50 -0700 Subject: [PATCH 35/36] Refactor selection_heatmap example + add it to the gallery Adjust the size, remove unnecessary configs, make rangeSteep larger --- _data/examples.json | 4 ++++ examples/specs/selection_heatmap.vl.json | 11 ++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/_data/examples.json b/_data/examples.json index 779adfd7aa..bd37db64ec 100644 --- a/_data/examples.json +++ b/_data/examples.json @@ -593,6 +593,10 @@ { "name": "brush_table", "title": "Brushing Scatter Plot to show data on a table" + }, + { + "name": "selection_heatmap", + "title": "Selectable Heatmap" } ], "Interactive Multi-View Displays": [ diff --git a/examples/specs/selection_heatmap.vl.json b/examples/specs/selection_heatmap.vl.json index 833f1ad284..1f7417f746 100644 --- a/examples/specs/selection_heatmap.vl.json +++ b/examples/specs/selection_heatmap.vl.json @@ -27,21 +27,18 @@ }, "color": { "field": "count", - "type": "quantitative", - "scale": {"scheme": "plasma"} + "type": "quantitative" }, - "fillOpacity": { + "opacity": { "condition": {"selection": "highlight", "value": 1}, "value": 0.5 } }, "config": { - "axis": { - "zindex": 0 - }, "scale": { "bandPaddingInner": 0, - "bandPaddingOuter": 0 + "bandPaddingOuter": 0, + "rangeStep": 40 }, "range": { "ramp": { From dd9d82e02926f3a60dd7f456e193b709543f68be Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 6 Apr 2019 04:24:36 +0000 Subject: [PATCH 36/36] [Travis] Update examples (build: 22876) --- examples/compiled/selection_heatmap.svg | 2 +- examples/compiled/selection_heatmap.vg.json | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/examples/compiled/selection_heatmap.svg b/examples/compiled/selection_heatmap.svg index 52179d482d..fd8bfc339a 100644 --- a/examples/compiled/selection_heatmap.svg +++ b/examples/compiled/selection_heatmap.svg @@ -1 +1 @@ -0510countABCpredictedABCactual \ No newline at end of file +0510countABCpredictedABCactual \ No newline at end of file diff --git a/examples/compiled/selection_heatmap.vg.json b/examples/compiled/selection_heatmap.vg.json index bb51a3bb92..80334716a5 100644 --- a/examples/compiled/selection_heatmap.vg.json +++ b/examples/compiled/selection_heatmap.vg.json @@ -32,9 +32,9 @@ } ], "signals": [ - {"name": "x_step", "value": 20}, + {"name": "x_step", "value": 40}, {"name": "width", "update": "bandspace(domain('x').length, 0, 0) * x_step"}, - {"name": "y_step", "value": 20}, + {"name": "y_step", "value": 40}, { "name": "height", "update": "bandspace(domain('y').length, 0, 0) * y_step" @@ -76,7 +76,7 @@ "encode": { "update": { "fill": {"scale": "color", "field": "count"}, - "fillOpacity": [ + "opacity": [ { "test": "!(length(data(\"highlight_store\"))) || (vlSelectionTest(\"highlight_store\", datum))", "value": 1 @@ -115,7 +115,7 @@ "name": "color", "type": "linear", "domain": {"data": "data_0", "field": "count"}, - "range": {"scheme": "plasma"}, + "range": "ramp", "interpolate": "hcl", "zero": false } @@ -144,11 +144,9 @@ "fill": "color", "gradientLength": {"signal": "clamp(height, 64, 200)"}, "symbolType": "circle", - "title": "count" + "title": "count", + "encode": {"gradient": {"update": {"opacity": {"value": 1}}}} } ], - "config": { - "axis": {"zindex": 0}, - "range": {"ramp": {"scheme": "yellowgreenblue"}} - } + "config": {"range": {"ramp": {"scheme": "yellowgreenblue"}}} }