diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json
index 9625dcf20e..862a467370 100644
--- a/build/vega-lite-schema.json
+++ b/build/vega-lite-schema.json
@@ -5988,6 +5988,10 @@
},
"type": "array"
},
+ "init": {
+ "$ref": "#/definitions/SelectionInitArrayMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and arrays of\ninitial values."
+ },
"mark": {
"$ref": "#/definitions/BrushConfig",
"description": "An interval selection also adds a rectangle mark to depict the\nextents of the interval. The `mark` property can be used to customize the\nappearance of the mark."
@@ -6058,6 +6062,10 @@
},
"type": "array"
},
+ "init": {
+ "$ref": "#/definitions/SelectionInitArrayMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and arrays of\ninitial values."
+ },
"mark": {
"$ref": "#/definitions/BrushConfig",
"description": "An interval selection also adds a rectangle mark to depict the\nextents of the interval. The `mark` property can be used to customize the\nappearance of the mark."
@@ -7665,6 +7673,20 @@
},
"type": "array"
},
+ "init": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SelectionInitMapping"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/SelectionInitMapping"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and an initial\nvalue (or array of values)."
+ },
"nearest": {
"description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](https://vega.github.io/vega-lite/docs/nearest.html) documentation for more information.",
"type": "boolean"
@@ -7721,6 +7743,20 @@
},
"type": "array"
},
+ "init": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/SelectionInitMapping"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/SelectionInitMapping"
+ },
+ "type": "array"
+ }
+ ],
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and an initial\nvalue (or array of values)."
+ },
"nearest": {
"description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](https://vega.github.io/vega-lite/docs/nearest.html) documentation for more information.",
"type": "boolean"
@@ -9247,6 +9283,62 @@
}
]
},
+ "SelectionInit": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "$ref": "#/definitions/DateTime"
+ }
+ ]
+ },
+ "SelectionInitArray": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "boolean"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "items": {
+ "$ref": "#/definitions/DateTime"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "SelectionInitArrayMapping": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionInitArray"
+ },
+ "type": "object"
+ },
+ "SelectionInitMapping": {
+ "additionalProperties": {
+ "$ref": "#/definitions/SelectionInit"
+ },
+ "type": "object"
+ },
"SelectionPredicate": {
"additionalProperties": false,
"properties": {
@@ -9358,6 +9450,10 @@
},
"type": "array"
},
+ "init": {
+ "$ref": "#/definitions/SelectionInitMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and initial values."
+ },
"nearest": {
"description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](https://vega.github.io/vega-lite/docs/nearest.html) documentation for more information.",
"type": "boolean"
@@ -9421,6 +9517,10 @@
},
"type": "array"
},
+ "init": {
+ "$ref": "#/definitions/SelectionInitMapping",
+ "description": "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and initial values."
+ },
"nearest": {
"description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](https://vega.github.io/vega-lite/docs/nearest.html) documentation for more information.",
"type": "boolean"
diff --git a/examples/compiled/circle_bubble_health_income.vg.json b/examples/compiled/circle_bubble_health_income.vg.json
index 0f2285ff79..5e0dfe9b99 100644
--- a/examples/compiled/circle_bubble_health_income.vg.json
+++ b/examples/compiled/circle_bubble_health_income.vg.json
@@ -54,13 +54,16 @@
"on": [
{
"events": [{"signal": "view_income"}, {"signal": "view_health"}],
- "update": "view_income && view_health ? {unit: \"\", fields: view_tuple_fields, values: [view_income, view_health]} : null"
+ "update": "view_income && view_health ? {unit: \"\", fields: view_tuple_fields, values: [view_income,view_health]} : null"
}
]
},
{
"name": "view_tuple_fields",
- "update": "[{\"field\":\"income\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"health\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "income", "channel": "x", "type": "R"},
+ {"field": "health", "channel": "y", "type": "R"}
+ ]
},
{
"name": "view_translate_anchor",
@@ -113,12 +116,7 @@
},
{
"name": "view_modify",
- "on": [
- {
- "events": {"signal": "view_tuple"},
- "update": "modify(\"view_store\", view_tuple, true)"
- }
- ]
+ "update": "modify(\"view_store\", view_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/concat_bar_layer_circle.vg.json b/examples/compiled/concat_bar_layer_circle.vg.json
index 025ebc7d19..1c554482da 100644
--- a/examples/compiled/concat_bar_layer_circle.vg.json
+++ b/examples/compiled/concat_bar_layer_circle.vg.json
@@ -294,7 +294,6 @@
"signals": [
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -305,16 +304,11 @@
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Major_Genre\",\"channel\":\"x\",\"type\":\"E\"}]"
+ "value": [{"field": "Major_Genre", "channel": "x", "type": "E"}]
},
{
"name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
+ "update": "modify(\"pts_store\", pts_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_area_brush.vg.json b/examples/compiled/interactive_area_brush.vg.json
index 05ee457cee..5c57ad1c35 100644
--- a/examples/compiled/interactive_area_brush.vg.json
+++ b/examples/compiled/interactive_area_brush.vg.json
@@ -132,7 +132,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"yearmonth_date\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "yearmonth_date", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -205,12 +205,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_bar_select_highlight.vg.json b/examples/compiled/interactive_bar_select_highlight.vg.json
index f48500a946..3379c91534 100644
--- a/examples/compiled/interactive_bar_select_highlight.vg.json
+++ b/examples/compiled/interactive_bar_select_highlight.vg.json
@@ -45,7 +45,6 @@
{"name": "select", "update": "vlSelectionResolve(\"select_store\")"},
{
"name": "highlight_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
@@ -56,20 +55,14 @@
},
{
"name": "highlight_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "highlight_modify",
- "on": [
- {
- "events": {"signal": "highlight_tuple"},
- "update": "modify(\"highlight_store\", highlight_tuple, true)"
- }
- ]
+ "update": "modify(\"highlight_store\", highlight_tuple, true)"
},
{
"name": "select_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -80,7 +73,7 @@
},
{
"name": "select_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "select_toggle",
@@ -94,12 +87,7 @@
},
{
"name": "select_modify",
- "on": [
- {
- "events": {"signal": "select_tuple"},
- "update": "modify(\"select_store\", select_toggle ? null : select_tuple, select_toggle ? null : true, select_toggle ? select_tuple : null)"
- }
- ]
+ "update": "modify(\"select_store\", select_toggle ? null : select_tuple, select_toggle ? null : true, select_toggle ? select_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_brush.svg b/examples/compiled/interactive_brush.svg
index 350a0349f7..835440d0c5 100644
--- a/examples/compiled/interactive_brush.svg
+++ b/examples/compiled/interactive_brush.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/examples/compiled/interactive_brush.vg.json b/examples/compiled/interactive_brush.vg.json
index 24387b45ff..c4d6bfb0d9 100644
--- a/examples/compiled/interactive_brush.vg.json
+++ b/examples/compiled/interactive_brush.vg.json
@@ -21,7 +21,7 @@
{"name": "brush", "update": "vlSelectionResolve(\"brush_store\")"},
{
"name": "brush_x",
- "value": [],
+ "init": "[scale(\"x\", 55), scale(\"x\", 160)]",
"on": [
{
"events": {
@@ -67,6 +67,7 @@
},
{
"name": "brush_Horsepower",
+ "init": "[55, 160]",
"on": [
{
"events": {"signal": "brush_x"},
@@ -76,7 +77,7 @@
},
{
"name": "brush_y",
- "value": [],
+ "init": "[scale(\"y\", 13), scale(\"y\", 37)]",
"on": [
{
"events": {
@@ -122,6 +123,7 @@
},
{
"name": "brush_Miles_per_Gallon",
+ "init": "[13, 37]",
"on": [
{
"events": {"signal": "brush_y"},
@@ -135,19 +137,23 @@
},
{
"name": "brush_tuple",
+ "init": "{unit: \"\", fields: brush_tuple_fields, values: [[55, 160], [13, 37]]}",
"on": [
{
"events": [
{"signal": "brush_Horsepower"},
{"signal": "brush_Miles_per_Gallon"}
],
- "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower, brush_Miles_per_Gallon]} : null"
+ "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -220,12 +226,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_concat_layer.vg.json b/examples/compiled/interactive_concat_layer.vg.json
index 6758819051..bfd5a06ca9 100644
--- a/examples/compiled/interactive_concat_layer.vg.json
+++ b/examples/compiled/interactive_concat_layer.vg.json
@@ -297,7 +297,6 @@
"signals": [
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -308,16 +307,11 @@
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Major_Genre\",\"channel\":\"x\",\"type\":\"E\"}]"
+ "value": [{"field": "Major_Genre", "channel": "x", "type": "E"}]
},
{
"name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
+ "update": "modify(\"pts_store\", pts_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_dashboard_europe_pop.vg.json b/examples/compiled/interactive_dashboard_europe_pop.vg.json
index 17ffeee758..5e482efc31 100644
--- a/examples/compiled/interactive_dashboard_europe_pop.vg.json
+++ b/examples/compiled/interactive_dashboard_europe_pop.vg.json
@@ -410,7 +410,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Country\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [{"field": "Country", "channel": "y", "type": "E"}]
},
{
"name": "brush_translate_anchor",
@@ -487,12 +487,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -723,7 +718,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Country\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [{"field": "Country", "channel": "y", "type": "E"}]
},
{
"name": "brush_translate_anchor",
@@ -800,12 +795,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -1091,13 +1081,24 @@
{"signal": "brush_Population_ages_65_and_above_of_total"},
{"signal": "brush_Population_ages_15_64_of_total"}
],
- "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Population_ages_65_and_above_of_total\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Population_ages_15_64_of_total\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {
+ "field": "Population_ages_65_and_above_of_total",
+ "channel": "x",
+ "type": "R"
+ },
+ {
+ "field": "Population_ages_15_64_of_total",
+ "channel": "y",
+ "type": "R"
+ }
+ ]
},
{
"name": "brush_translate_anchor",
@@ -1174,12 +1175,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_layered_crossfilter.vg.json b/examples/compiled/interactive_layered_crossfilter.vg.json
index a3010e121b..4e49b6fbf8 100644
--- a/examples/compiled/interactive_layered_crossfilter.vg.json
+++ b/examples/compiled/interactive_layered_crossfilter.vg.json
@@ -290,7 +290,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"distance\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "distance", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -367,12 +367,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -644,7 +639,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"delay\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "delay", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -721,12 +716,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -998,7 +988,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"time\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "time", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -1075,12 +1065,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json
index 50d06e3e40..7127f866bd 100644
--- a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json
+++ b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json
@@ -222,7 +222,6 @@
"signals": [
{
"name": "brush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -233,7 +232,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"distance\",\"channel\":\"x\",\"type\":\"R-RE\"}]"
+ "value": [{"field": "distance", "channel": "x", "type": "R-RE"}]
},
{
"name": "brush_toggle",
@@ -247,12 +246,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_toggle ? null : brush_tuple, brush_toggle ? null : true, brush_toggle ? brush_tuple : null)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_toggle ? null : brush_tuple, brush_toggle ? null : true, brush_toggle ? brush_tuple : null)"
}
],
"marks": [
@@ -373,7 +367,6 @@
"signals": [
{
"name": "brush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -384,7 +377,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"delay\",\"channel\":\"x\",\"type\":\"R-RE\"}]"
+ "value": [{"field": "delay", "channel": "x", "type": "R-RE"}]
},
{
"name": "brush_toggle",
@@ -398,12 +391,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_toggle ? null : brush_tuple, brush_toggle ? null : true, brush_toggle ? brush_tuple : null)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_toggle ? null : brush_tuple, brush_toggle ? null : true, brush_toggle ? brush_tuple : null)"
}
],
"marks": [
@@ -524,7 +512,6 @@
"signals": [
{
"name": "brush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -535,7 +522,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"time\",\"channel\":\"x\",\"type\":\"R-RE\"}]"
+ "value": [{"field": "time", "channel": "x", "type": "R-RE"}]
},
{
"name": "brush_toggle",
@@ -549,12 +536,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_toggle ? null : brush_tuple, brush_toggle ? null : true, brush_toggle ? brush_tuple : null)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_toggle ? null : brush_tuple, brush_toggle ? null : true, brush_toggle ? brush_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_multi_line_label.vg.json b/examples/compiled/interactive_multi_line_label.vg.json
index 031c837d90..c61fd22177 100644
--- a/examples/compiled/interactive_multi_line_label.vg.json
+++ b/examples/compiled/interactive_multi_line_label.vg.json
@@ -31,7 +31,6 @@
{"name": "label", "update": "vlSelectionResolve(\"label_store\")"},
{
"name": "label_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
@@ -42,16 +41,11 @@
},
{
"name": "label_tuple_fields",
- "update": "[{\"field\":\"date\",\"channel\":\"x\",\"type\":\"E\"}]"
+ "value": [{"field": "date", "channel": "x", "type": "E"}]
},
{
"name": "label_modify",
- "on": [
- {
- "events": {"signal": "label_tuple"},
- "update": "modify(\"label_store\", label_tuple, true)"
- }
- ]
+ "update": "modify(\"label_store\", label_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_multi_line_tooltip.vg.json b/examples/compiled/interactive_multi_line_tooltip.vg.json
index b86b1d7a5f..b6d9ad92c0 100644
--- a/examples/compiled/interactive_multi_line_tooltip.vg.json
+++ b/examples/compiled/interactive_multi_line_tooltip.vg.json
@@ -48,7 +48,6 @@
{"name": "hover", "update": "vlSelectionResolve(\"hover_store\")"},
{
"name": "hover_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
@@ -59,16 +58,11 @@
},
{
"name": "hover_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "hover_modify",
- "on": [
- {
- "events": {"signal": "hover_tuple"},
- "update": "modify(\"hover_store\", hover_tuple, true)"
- }
- ]
+ "update": "modify(\"hover_store\", hover_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_overview_detail.vg.json b/examples/compiled/interactive_overview_detail.vg.json
index a2c32f2a41..c980cebf62 100644
--- a/examples/compiled/interactive_overview_detail.vg.json
+++ b/examples/compiled/interactive_overview_detail.vg.json
@@ -193,7 +193,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"date\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "date", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -270,12 +270,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_paintbrush.vg.json b/examples/compiled/interactive_paintbrush.vg.json
index 7e59109cc6..91dc10ad59 100644
--- a/examples/compiled/interactive_paintbrush.vg.json
+++ b/examples/compiled/interactive_paintbrush.vg.json
@@ -29,7 +29,6 @@
},
{
"name": "paintbrush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
@@ -40,7 +39,7 @@
},
{
"name": "paintbrush_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "paintbrush_toggle",
@@ -54,12 +53,7 @@
},
{
"name": "paintbrush_modify",
- "on": [
- {
- "events": {"signal": "paintbrush_tuple"},
- "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
- }
- ]
+ "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_paintbrush_color.vg.json b/examples/compiled/interactive_paintbrush_color.vg.json
index 87669f7191..52e499f553 100644
--- a/examples/compiled/interactive_paintbrush_color.vg.json
+++ b/examples/compiled/interactive_paintbrush_color.vg.json
@@ -29,7 +29,6 @@
},
{
"name": "paintbrush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
@@ -40,7 +39,7 @@
},
{
"name": "paintbrush_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "paintbrush_toggle",
@@ -54,12 +53,7 @@
},
{
"name": "paintbrush_modify",
- "on": [
- {
- "events": {"signal": "paintbrush_tuple"},
- "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
- }
- ]
+ "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_paintbrush_color_nearest.vg.json b/examples/compiled/interactive_paintbrush_color_nearest.vg.json
index 276a87156d..697d3a3705 100644
--- a/examples/compiled/interactive_paintbrush_color_nearest.vg.json
+++ b/examples/compiled/interactive_paintbrush_color_nearest.vg.json
@@ -29,7 +29,6 @@
},
{
"name": "paintbrush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
@@ -40,7 +39,7 @@
},
{
"name": "paintbrush_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "paintbrush_toggle",
@@ -54,12 +53,7 @@
},
{
"name": "paintbrush_modify",
- "on": [
- {
- "events": {"signal": "paintbrush_tuple"},
- "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
- }
- ]
+ "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_paintbrush_interval.vg.json b/examples/compiled/interactive_paintbrush_interval.vg.json
index 5740623884..c20c519020 100644
--- a/examples/compiled/interactive_paintbrush_interval.vg.json
+++ b/examples/compiled/interactive_paintbrush_interval.vg.json
@@ -144,13 +144,16 @@
{"signal": "paintbrush_Horsepower"},
{"signal": "paintbrush_Miles_per_Gallon"}
],
- "update": "paintbrush_Horsepower && paintbrush_Miles_per_Gallon ? {unit: \"\", fields: paintbrush_tuple_fields, values: [paintbrush_Horsepower, paintbrush_Miles_per_Gallon]} : null"
+ "update": "paintbrush_Horsepower && paintbrush_Miles_per_Gallon ? {unit: \"\", fields: paintbrush_tuple_fields, values: [paintbrush_Horsepower,paintbrush_Miles_per_Gallon]} : null"
}
]
},
{
"name": "paintbrush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "paintbrush_translate_anchor",
@@ -227,12 +230,7 @@
},
{
"name": "paintbrush_modify",
- "on": [
- {
- "events": {"signal": "paintbrush_tuple"},
- "update": "modify(\"paintbrush_store\", paintbrush_tuple, true)"
- }
- ]
+ "update": "modify(\"paintbrush_store\", paintbrush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_paintbrush_simple_all.vg.json b/examples/compiled/interactive_paintbrush_simple_all.vg.json
index 911a2dcf7e..a4784d50c4 100644
--- a/examples/compiled/interactive_paintbrush_simple_all.vg.json
+++ b/examples/compiled/interactive_paintbrush_simple_all.vg.json
@@ -28,7 +28,6 @@
},
{
"name": "paintbrush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
@@ -39,7 +38,7 @@
},
{
"name": "paintbrush_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "paintbrush_toggle",
@@ -53,12 +52,7 @@
},
{
"name": "paintbrush_modify",
- "on": [
- {
- "events": {"signal": "paintbrush_tuple"},
- "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
- }
- ]
+ "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_paintbrush_simple_none.vg.json b/examples/compiled/interactive_paintbrush_simple_none.vg.json
index 13b03d3231..4c60f17b1a 100644
--- a/examples/compiled/interactive_paintbrush_simple_none.vg.json
+++ b/examples/compiled/interactive_paintbrush_simple_none.vg.json
@@ -28,7 +28,6 @@
},
{
"name": "paintbrush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
@@ -39,7 +38,7 @@
},
{
"name": "paintbrush_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "paintbrush_toggle",
@@ -53,12 +52,7 @@
},
{
"name": "paintbrush_modify",
- "on": [
- {
- "events": {"signal": "paintbrush_tuple"},
- "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
- }
- ]
+ "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_panzoom_splom.vg.json b/examples/compiled/interactive_panzoom_splom.vg.json
index b4f9bba497..7b9dee33a2 100644
--- a/examples/compiled/interactive_panzoom_splom.vg.json
+++ b/examples/compiled/interactive_panzoom_splom.vg.json
@@ -75,13 +75,16 @@
{"signal": "grid_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -134,12 +137,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -273,13 +271,16 @@
{"signal": "grid_Acceleration"},
{"signal": "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"
+ "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -332,12 +333,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -460,7 +456,7 @@
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Horsepower", "channel": "x", "type": "R"}]
},
{
"name": "grid_translate_anchor",
@@ -513,12 +509,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -652,13 +643,16 @@
{"signal": "grid_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -711,12 +705,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -839,7 +828,7 @@
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Acceleration", "channel": "x", "type": "R"}]
},
{
"name": "grid_translate_anchor",
@@ -892,12 +881,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -1031,13 +1015,16 @@
{"signal": "grid_Horsepower"},
{"signal": "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"
+ "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -1090,12 +1077,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -1218,7 +1200,7 @@
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}]
},
{
"name": "grid_translate_anchor",
@@ -1271,12 +1253,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -1410,13 +1387,16 @@
{"signal": "grid_Acceleration"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -1469,12 +1449,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -1608,13 +1583,16 @@
{"signal": "grid_Horsepower"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -1667,12 +1645,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json
index c57eb633bf..07291a8234 100644
--- a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json
+++ b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json
@@ -78,13 +78,16 @@
{"signal": "region_Horsepower"},
{"signal": "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"
+ "update": "region_Horsepower && region_Miles_per_Gallon ? {unit: \"concat_0\", fields: region_tuple_fields, values: [region_Horsepower,region_Miles_per_Gallon]} : null"
}
]
},
{
"name": "region_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "region_translate_anchor",
@@ -137,12 +140,7 @@
},
{
"name": "region_modify",
- "on": [
- {
- "events": {"signal": "region_tuple"},
- "update": "modify(\"region_store\", region_tuple, true)"
- }
- ]
+ "update": "modify(\"region_store\", region_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_query_widgets.svg b/examples/compiled/interactive_query_widgets.svg
index c897598e4c..2f14c7d2d1 100644
--- a/examples/compiled/interactive_query_widgets.svg
+++ b/examples/compiled/interactive_query_widgets.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/examples/compiled/interactive_query_widgets.vg.json b/examples/compiled/interactive_query_widgets.vg.json
index 13f805021c..8e3e9783f5 100644
--- a/examples/compiled/interactive_query_widgets.vg.json
+++ b/examples/compiled/interactive_query_widgets.vg.json
@@ -37,7 +37,7 @@
},
{
"name": "CylYr_Year",
- "value": "",
+ "init": "1977",
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -48,7 +48,7 @@
},
{
"name": "CylYr_Cylinders",
- "value": "",
+ "init": "4",
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -62,18 +62,20 @@
"name": "CylYr_tuple",
"update": "CylYr_Cylinders !== null && CylYr_Year !== null ? {fields: CylYr_tuple_fields, values: [CylYr_Cylinders, CylYr_Year]} : null"
},
+ {
+ "name": "CylYr_init",
+ "init": "modify(\"CylYr_store\", [{unit: \"layer_0\", fields: CylYr_tuple_fields, values: [4, 1977]}])"
+ },
{
"name": "CylYr_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"type\":\"E\"},{\"field\":\"Year\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "type": "E"},
+ {"field": "Year", "type": "E"}
+ ]
},
{
"name": "CylYr_modify",
- "on": [
- {
- "events": {"signal": "CylYr_tuple"},
- "update": "modify(\"CylYr_store\", CylYr_tuple, true)"
- }
- ]
+ "update": "modify(\"CylYr_store\", CylYr_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json
index 30929d8193..406f3a255d 100644
--- a/examples/compiled/interactive_seattle_weather.vg.json
+++ b/examples/compiled/interactive_seattle_weather.vg.json
@@ -156,7 +156,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"monthdate_date\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "monthdate_date", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -233,12 +233,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -428,7 +423,6 @@
"signals": [
{
"name": "click_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -439,7 +433,7 @@
},
{
"name": "click_tuple_fields",
- "update": "[{\"field\":\"weather\",\"channel\":\"color\",\"type\":\"E\"}]"
+ "value": [{"field": "weather", "channel": "color", "type": "E"}]
},
{
"name": "click_toggle",
@@ -453,12 +447,7 @@
},
{
"name": "click_modify",
- "on": [
- {
- "events": {"signal": "click_tuple"},
- "update": "modify(\"click_store\", click_toggle ? null : click_tuple, click_toggle ? null : true, click_toggle ? click_tuple : null)"
- }
- ]
+ "update": "modify(\"click_store\", click_toggle ? null : click_tuple, click_toggle ? null : true, click_toggle ? click_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_splom.vg.json b/examples/compiled/interactive_splom.vg.json
index e8e6a01caf..cb3a7d36f1 100644
--- a/examples/compiled/interactive_splom.vg.json
+++ b/examples/compiled/interactive_splom.vg.json
@@ -170,13 +170,16 @@
{"signal": "brush_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -257,12 +260,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\"})"
},
{
"name": "grid_Miles_per_Gallon",
@@ -300,13 +298,16 @@
{"signal": "grid_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -383,12 +384,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -655,13 +651,16 @@
{"signal": "brush_Acceleration"},
{"signal": "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"
+ "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -742,12 +741,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\"})"
},
{
"name": "grid_Acceleration",
@@ -785,13 +779,16 @@
{"signal": "grid_Acceleration"},
{"signal": "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"
+ "update": "grid_Acceleration && grid_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: grid_tuple_fields, values: [grid_Acceleration,grid_Horsepower]} : null"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -868,12 +865,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -1086,7 +1078,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Horsepower", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -1167,12 +1159,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\"})"
},
{
"name": "grid_Horsepower",
@@ -1199,7 +1186,7 @@
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Horsepower", "channel": "x", "type": "R"}]
},
{
"name": "grid_translate_anchor",
@@ -1276,12 +1263,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -1545,13 +1527,16 @@
{"signal": "brush_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -1632,12 +1617,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\"})"
},
{
"name": "grid_Miles_per_Gallon",
@@ -1675,13 +1655,16 @@
{"signal": "grid_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -1758,12 +1741,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -1976,7 +1954,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Acceleration", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -2057,12 +2035,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\"})"
},
{
"name": "grid_Acceleration",
@@ -2089,7 +2062,7 @@
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Acceleration", "channel": "x", "type": "R"}]
},
{
"name": "grid_translate_anchor",
@@ -2166,12 +2139,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -2435,13 +2403,16 @@
{"signal": "brush_Horsepower"},
{"signal": "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"
+ "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -2522,12 +2493,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\"})"
},
{
"name": "grid_Horsepower",
@@ -2565,13 +2531,16 @@
{"signal": "grid_Horsepower"},
{"signal": "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"
+ "update": "grid_Horsepower && grid_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Acceleration]} : null"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -2648,12 +2617,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -2866,7 +2830,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -2947,12 +2911,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\"})"
},
{
"name": "grid_Miles_per_Gallon",
@@ -2979,7 +2938,7 @@
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}]
},
{
"name": "grid_translate_anchor",
@@ -3056,12 +3015,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -3325,13 +3279,16 @@
{"signal": "brush_Acceleration"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -3412,12 +3369,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\"})"
},
{
"name": "grid_Acceleration",
@@ -3455,13 +3407,16 @@
{"signal": "grid_Acceleration"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -3538,12 +3493,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
@@ -3810,13 +3760,16 @@
{"signal": "brush_Horsepower"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -3897,12 +3850,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\"})"
},
{
"name": "grid_Horsepower",
@@ -3940,13 +3888,16 @@
{"signal": "grid_Horsepower"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -4023,12 +3974,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/interactive_stocks_nearest_index.vg.json b/examples/compiled/interactive_stocks_nearest_index.vg.json
index 970fa97435..a702c0d67b 100644
--- a/examples/compiled/interactive_stocks_nearest_index.vg.json
+++ b/examples/compiled/interactive_stocks_nearest_index.vg.json
@@ -34,7 +34,6 @@
{"name": "index", "update": "vlSelectionResolve(\"index_store\")"},
{
"name": "index_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "mousemove"}],
@@ -45,16 +44,11 @@
},
{
"name": "index_tuple_fields",
- "update": "[{\"field\":\"date\",\"channel\":\"x\",\"type\":\"E\"}]"
+ "value": [{"field": "date", "channel": "x", "type": "E"}]
},
{
"name": "index_modify",
- "on": [
- {
- "events": {"signal": "index_tuple"},
- "update": "modify(\"index_store\", index_tuple, true)"
- }
- ]
+ "update": "modify(\"index_store\", index_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/isotype_grid.vg.json b/examples/compiled/isotype_grid.vg.json
index 18aaf7e3b5..5fa74f8fb5 100644
--- a/examples/compiled/isotype_grid.vg.json
+++ b/examples/compiled/isotype_grid.vg.json
@@ -243,13 +243,16 @@
"on": [
{
"events": [{"signal": "highlight_col"}, {"signal": "highlight_row"}],
- "update": "highlight_col && highlight_row ? {unit: \"\", fields: highlight_tuple_fields, values: [highlight_col, highlight_row]} : null"
+ "update": "highlight_col && highlight_row ? {unit: \"\", fields: highlight_tuple_fields, values: [highlight_col,highlight_row]} : null"
}
]
},
{
"name": "highlight_tuple_fields",
- "update": "[{\"field\":\"col\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"row\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "col", "channel": "x", "type": "E"},
+ {"field": "row", "channel": "y", "type": "E"}
+ ]
},
{
"name": "highlight_translate_anchor",
@@ -326,12 +329,7 @@
},
{
"name": "highlight_modify",
- "on": [
- {
- "events": {"signal": "highlight_tuple"},
- "update": "modify(\"highlight_store\", highlight_tuple, true)"
- }
- ]
+ "update": "modify(\"highlight_store\", highlight_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_bind_cylyr.vg.json b/examples/compiled/selection_bind_cylyr.vg.json
index a392e19a8c..b56e985cce 100644
--- a/examples/compiled/selection_bind_cylyr.vg.json
+++ b/examples/compiled/selection_bind_cylyr.vg.json
@@ -26,7 +26,7 @@
},
{
"name": "CylYr_Year",
- "value": "",
+ "value": null,
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -37,7 +37,7 @@
},
{
"name": "CylYr_Cylinders",
- "value": "",
+ "value": null,
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -53,16 +53,14 @@
},
{
"name": "CylYr_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"type\":\"E\"},{\"field\":\"Year\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "type": "E"},
+ {"field": "Year", "type": "E"}
+ ]
},
{
"name": "CylYr_modify",
- "on": [
- {
- "events": {"signal": "CylYr_tuple"},
- "update": "modify(\"CylYr_store\", CylYr_tuple, true)"
- }
- ]
+ "update": "modify(\"CylYr_store\", CylYr_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_bind_origin.vg.json b/examples/compiled/selection_bind_origin.vg.json
index fdf6865bb5..418cd8e7e9 100644
--- a/examples/compiled/selection_bind_origin.vg.json
+++ b/examples/compiled/selection_bind_origin.vg.json
@@ -19,7 +19,7 @@
},
{
"name": "org_Origin",
- "value": "",
+ "value": null,
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -33,19 +33,8 @@
"name": "org_tuple",
"update": "org_Origin !== null ? {fields: org_tuple_fields, values: [org_Origin]} : null"
},
- {
- "name": "org_tuple_fields",
- "update": "[{\"field\":\"Origin\",\"type\":\"E\"}]"
- },
- {
- "name": "org_modify",
- "on": [
- {
- "events": {"signal": "org_tuple"},
- "update": "modify(\"org_store\", org_tuple, true)"
- }
- ]
- }
+ {"name": "org_tuple_fields", "value": [{"field": "Origin", "type": "E"}]},
+ {"name": "org_modify", "update": "modify(\"org_store\", org_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_brush_timeunit.vg.json b/examples/compiled/selection_brush_timeunit.vg.json
index 11bd061996..6d795ac3b2 100644
--- a/examples/compiled/selection_brush_timeunit.vg.json
+++ b/examples/compiled/selection_brush_timeunit.vg.json
@@ -142,7 +142,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"seconds_date\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "seconds_date", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -219,12 +219,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_composition_and.vg.json b/examples/compiled/selection_composition_and.vg.json
index 04fcbf1965..5796027631 100644
--- a/examples/compiled/selection_composition_and.vg.json
+++ b/examples/compiled/selection_composition_and.vg.json
@@ -153,13 +153,16 @@
"on": [
{
"events": [{"signal": "alex_Cylinders"}, {"signal": "alex_Origin"}],
- "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders, alex_Origin]} : null"
+ "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null"
}
]
},
{
"name": "alex_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "channel": "x", "type": "E"},
+ {"field": "Origin", "channel": "y", "type": "E"}
+ ]
},
{
"name": "alex_translate_anchor",
@@ -237,12 +240,7 @@
},
{
"name": "alex_modify",
- "on": [
- {
- "events": {"signal": "alex_tuple"},
- "update": "modify(\"alex_store\", alex_tuple, true)"
- }
- ]
+ "update": "modify(\"alex_store\", alex_tuple, true)"
},
{
"name": "morgan_x",
@@ -362,13 +360,16 @@
{"signal": "morgan_Cylinders"},
{"signal": "morgan_Origin"}
],
- "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders, morgan_Origin]} : null"
+ "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null"
}
]
},
{
"name": "morgan_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "channel": "x", "type": "E"},
+ {"field": "Origin", "channel": "y", "type": "E"}
+ ]
},
{
"name": "morgan_translate_anchor",
@@ -446,12 +447,7 @@
},
{
"name": "morgan_modify",
- "on": [
- {
- "events": {"signal": "morgan_tuple"},
- "update": "modify(\"morgan_store\", morgan_tuple, true)"
- }
- ]
+ "update": "modify(\"morgan_store\", morgan_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_composition_or.vg.json b/examples/compiled/selection_composition_or.vg.json
index 4472bf5a64..4c2a9a4556 100644
--- a/examples/compiled/selection_composition_or.vg.json
+++ b/examples/compiled/selection_composition_or.vg.json
@@ -153,13 +153,16 @@
"on": [
{
"events": [{"signal": "alex_Cylinders"}, {"signal": "alex_Origin"}],
- "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders, alex_Origin]} : null"
+ "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null"
}
]
},
{
"name": "alex_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "channel": "x", "type": "E"},
+ {"field": "Origin", "channel": "y", "type": "E"}
+ ]
},
{
"name": "alex_translate_anchor",
@@ -237,12 +240,7 @@
},
{
"name": "alex_modify",
- "on": [
- {
- "events": {"signal": "alex_tuple"},
- "update": "modify(\"alex_store\", alex_tuple, true)"
- }
- ]
+ "update": "modify(\"alex_store\", alex_tuple, true)"
},
{
"name": "morgan_x",
@@ -362,13 +360,16 @@
{"signal": "morgan_Cylinders"},
{"signal": "morgan_Origin"}
],
- "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders, morgan_Origin]} : null"
+ "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null"
}
]
},
{
"name": "morgan_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "channel": "x", "type": "E"},
+ {"field": "Origin", "channel": "y", "type": "E"}
+ ]
},
{
"name": "morgan_translate_anchor",
@@ -446,12 +447,7 @@
},
{
"name": "morgan_modify",
- "on": [
- {
- "events": {"signal": "morgan_tuple"},
- "update": "modify(\"morgan_store\", morgan_tuple, true)"
- }
- ]
+ "update": "modify(\"morgan_store\", morgan_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_concat.vg.json b/examples/compiled/selection_concat.vg.json
index 20edcc6648..3b98685d48 100644
--- a/examples/compiled/selection_concat.vg.json
+++ b/examples/compiled/selection_concat.vg.json
@@ -166,13 +166,16 @@
{"signal": "brush_Miles_per_Gallon"},
{"signal": "brush_Horsepower"}
],
- "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon, brush_Horsepower]} : null"
+ "update": "brush_Miles_per_Gallon && brush_Horsepower ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Miles_per_Gallon,brush_Horsepower]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -249,12 +252,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -470,13 +468,16 @@
{"signal": "grid_Displacement"},
{"signal": "grid_Acceleration"}
],
- "update": "grid_Displacement && grid_Acceleration ? {unit: \"concat_1\", fields: grid_tuple_fields, values: [grid_Displacement, grid_Acceleration]} : null"
+ "update": "grid_Displacement && grid_Acceleration ? {unit: \"concat_1\", fields: grid_tuple_fields, values: [grid_Displacement,grid_Acceleration]} : null"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Displacement\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Displacement", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -529,12 +530,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json
index 9af440f226..acfad9ffae 100644
--- a/examples/compiled/selection_filter.vg.json
+++ b/examples/compiled/selection_filter.vg.json
@@ -169,13 +169,16 @@
{"signal": "brush_Horsepower"},
{"signal": "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"
+ "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -252,12 +255,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json
index e6a6e038e3..cd2d7fc0bd 100644
--- a/examples/compiled/selection_filter_composition.vg.json
+++ b/examples/compiled/selection_filter_composition.vg.json
@@ -169,13 +169,16 @@
{"signal": "brush_Horsepower"},
{"signal": "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"
+ "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"concat_0\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -252,12 +255,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_insert.vg.json b/examples/compiled/selection_insert.vg.json
index 9abfa53c9f..a008fed611 100644
--- a/examples/compiled/selection_insert.vg.json
+++ b/examples/compiled/selection_insert.vg.json
@@ -28,7 +28,6 @@
},
{
"name": "paintbrush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -39,16 +38,11 @@
},
{
"name": "paintbrush_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "paintbrush_modify",
- "on": [
- {
- "events": {"signal": "paintbrush_tuple"},
- "update": "modify(\"paintbrush_store\", paintbrush_tuple, null)"
- }
- ]
+ "update": "modify(\"paintbrush_store\", paintbrush_tuple, null)"
}
],
"marks": [
diff --git a/examples/compiled/selection_interval_mark_style.vg.json b/examples/compiled/selection_interval_mark_style.vg.json
index 2f90fe9f97..314dea0434 100644
--- a/examples/compiled/selection_interval_mark_style.vg.json
+++ b/examples/compiled/selection_interval_mark_style.vg.json
@@ -153,13 +153,16 @@
"on": [
{
"events": [{"signal": "alex_Cylinders"}, {"signal": "alex_Origin"}],
- "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders, alex_Origin]} : null"
+ "update": "alex_Cylinders && alex_Origin ? {unit: \"\", fields: alex_tuple_fields, values: [alex_Cylinders,alex_Origin]} : null"
}
]
},
{
"name": "alex_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "channel": "x", "type": "E"},
+ {"field": "Origin", "channel": "y", "type": "E"}
+ ]
},
{
"name": "alex_translate_anchor",
@@ -237,12 +240,7 @@
},
{
"name": "alex_modify",
- "on": [
- {
- "events": {"signal": "alex_tuple"},
- "update": "modify(\"alex_store\", alex_tuple, true)"
- }
- ]
+ "update": "modify(\"alex_store\", alex_tuple, true)"
},
{
"name": "morgan_x",
@@ -362,13 +360,16 @@
{"signal": "morgan_Cylinders"},
{"signal": "morgan_Origin"}
],
- "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders, morgan_Origin]} : null"
+ "update": "morgan_Cylinders && morgan_Origin ? {unit: \"\", fields: morgan_tuple_fields, values: [morgan_Cylinders,morgan_Origin]} : null"
}
]
},
{
"name": "morgan_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "channel": "x", "type": "E"},
+ {"field": "Origin", "channel": "y", "type": "E"}
+ ]
},
{
"name": "morgan_translate_anchor",
@@ -446,12 +447,7 @@
},
{
"name": "morgan_modify",
- "on": [
- {
- "events": {"signal": "morgan_tuple"},
- "update": "modify(\"morgan_store\", morgan_tuple, true)"
- }
- ]
+ "update": "modify(\"morgan_store\", morgan_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_layer_bar_month.vg.json b/examples/compiled/selection_layer_bar_month.vg.json
index 2aa8739870..14139d7f8d 100644
--- a/examples/compiled/selection_layer_bar_month.vg.json
+++ b/examples/compiled/selection_layer_bar_month.vg.json
@@ -134,7 +134,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"month_date\",\"channel\":\"x\",\"type\":\"E\"}]"
+ "value": [{"field": "month_date", "channel": "x", "type": "E"}]
},
{
"name": "brush_translate_anchor",
@@ -207,12 +207,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json
index b3e733872d..9dab15098b 100644
--- a/examples/compiled/selection_multi_condition.vg.json
+++ b/examples/compiled/selection_multi_condition.vg.json
@@ -151,13 +151,16 @@
{"signal": "brush_Horsepower"},
{"signal": "brush_Miles_per_Gallon"}
],
- "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower, brush_Miles_per_Gallon]} : null"
+ "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -230,16 +233,10 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
},
{
"name": "hoverbrush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
@@ -250,7 +247,7 @@
},
{
"name": "hoverbrush_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "hoverbrush_toggle",
@@ -264,12 +261,7 @@
},
{
"name": "hoverbrush_modify",
- "on": [
- {
- "events": {"signal": "hoverbrush_tuple"},
- "update": "modify(\"hoverbrush_store\", hoverbrush_toggle ? null : hoverbrush_tuple, hoverbrush_toggle ? null : true, hoverbrush_toggle ? hoverbrush_tuple : null)"
- }
- ]
+ "update": "modify(\"hoverbrush_store\", hoverbrush_toggle ? null : hoverbrush_tuple, hoverbrush_toggle ? null : true, hoverbrush_toggle ? hoverbrush_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/selection_project_binned_interval.vg.json b/examples/compiled/selection_project_binned_interval.vg.json
index 2c3c7c0885..ef983d0bb5 100644
--- a/examples/compiled/selection_project_binned_interval.vg.json
+++ b/examples/compiled/selection_project_binned_interval.vg.json
@@ -156,7 +156,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Acceleration", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -229,12 +229,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_project_interval.vg.json b/examples/compiled/selection_project_interval.vg.json
index 25b0a28eff..ec4b109c05 100644
--- a/examples/compiled/selection_project_interval.vg.json
+++ b/examples/compiled/selection_project_interval.vg.json
@@ -145,13 +145,16 @@
"on": [
{
"events": [{"signal": "pts_Cylinders"}, {"signal": "pts_Origin"}],
- "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders, pts_Origin]} : null"
+ "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null"
}
]
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "channel": "x", "type": "E"},
+ {"field": "Origin", "channel": "y", "type": "E"}
+ ]
},
{
"name": "pts_translate_anchor",
@@ -222,15 +225,7 @@
}
]
},
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_project_interval_x.vg.json b/examples/compiled/selection_project_interval_x.vg.json
index 226ee88cfb..538e418763 100644
--- a/examples/compiled/selection_project_interval_x.vg.json
+++ b/examples/compiled/selection_project_interval_x.vg.json
@@ -101,7 +101,7 @@
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"}]"
+ "value": [{"field": "Cylinders", "channel": "x", "type": "E"}]
},
{
"name": "pts_translate_anchor",
@@ -172,15 +172,7 @@
}
]
},
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_project_interval_x_y.vg.json b/examples/compiled/selection_project_interval_x_y.vg.json
index 25b0a28eff..ec4b109c05 100644
--- a/examples/compiled/selection_project_interval_x_y.vg.json
+++ b/examples/compiled/selection_project_interval_x_y.vg.json
@@ -145,13 +145,16 @@
"on": [
{
"events": [{"signal": "pts_Cylinders"}, {"signal": "pts_Origin"}],
- "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders, pts_Origin]} : null"
+ "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null"
}
]
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "channel": "x", "type": "E"},
+ {"field": "Origin", "channel": "y", "type": "E"}
+ ]
},
{
"name": "pts_translate_anchor",
@@ -222,15 +225,7 @@
}
]
},
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_project_interval_y.vg.json b/examples/compiled/selection_project_interval_y.vg.json
index 1e30a3d0ef..fd7f82b2ba 100644
--- a/examples/compiled/selection_project_interval_y.vg.json
+++ b/examples/compiled/selection_project_interval_y.vg.json
@@ -101,7 +101,7 @@
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [{"field": "Origin", "channel": "y", "type": "E"}]
},
{
"name": "pts_translate_anchor",
@@ -172,15 +172,7 @@
}
]
},
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_project_multi.vg.json b/examples/compiled/selection_project_multi.vg.json
index e3645b79a0..6633548ec2 100644
--- a/examples/compiled/selection_project_multi.vg.json
+++ b/examples/compiled/selection_project_multi.vg.json
@@ -25,7 +25,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -34,10 +33,7 @@
}
]
},
- {
- "name": "pts_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
- },
+ {"name": "pts_tuple_fields", "value": [{"field": "_vgsid_", "type": "E"}]},
{
"name": "pts_toggle",
"value": false,
@@ -50,12 +46,7 @@
},
{
"name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
- }
- ]
+ "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/selection_project_multi_cylinders.vg.json b/examples/compiled/selection_project_multi_cylinders.vg.json
index 6528b93ff6..11f56bed72 100644
--- a/examples/compiled/selection_project_multi_cylinders.vg.json
+++ b/examples/compiled/selection_project_multi_cylinders.vg.json
@@ -20,7 +20,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -31,7 +30,7 @@
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"type\":\"E\"}]"
+ "value": [{"field": "Cylinders", "type": "E"}]
},
{
"name": "pts_toggle",
@@ -45,12 +44,7 @@
},
{
"name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
- }
- ]
+ "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/selection_project_multi_cylinders_origin.vg.json b/examples/compiled/selection_project_multi_cylinders_origin.vg.json
index 15ccba305e..eb502fb056 100644
--- a/examples/compiled/selection_project_multi_cylinders_origin.vg.json
+++ b/examples/compiled/selection_project_multi_cylinders_origin.vg.json
@@ -20,7 +20,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -31,7 +30,10 @@
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"type\":\"E\"},{\"field\":\"Origin\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "type": "E"},
+ {"field": "Origin", "type": "E"}
+ ]
},
{
"name": "pts_toggle",
@@ -45,12 +47,7 @@
},
{
"name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
- }
- ]
+ "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/selection_project_multi_origin.vg.json b/examples/compiled/selection_project_multi_origin.vg.json
index f4db50ba59..94c61c853a 100644
--- a/examples/compiled/selection_project_multi_origin.vg.json
+++ b/examples/compiled/selection_project_multi_origin.vg.json
@@ -20,7 +20,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -29,10 +28,7 @@
}
]
},
- {
- "name": "pts_tuple_fields",
- "update": "[{\"field\":\"Origin\",\"type\":\"E\"}]"
- },
+ {"name": "pts_tuple_fields", "value": [{"field": "Origin", "type": "E"}]},
{
"name": "pts_toggle",
"value": false,
@@ -45,12 +41,7 @@
},
{
"name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
- }
- ]
+ "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/selection_project_single.vg.json b/examples/compiled/selection_project_single.vg.json
index 46cb621d49..97441ceeca 100644
--- a/examples/compiled/selection_project_single.vg.json
+++ b/examples/compiled/selection_project_single.vg.json
@@ -25,7 +25,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -34,19 +33,8 @@
}
]
},
- {
- "name": "pts_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
- },
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_tuple_fields", "value": [{"field": "_vgsid_", "type": "E"}]},
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_project_single_cylinders.vg.json b/examples/compiled/selection_project_single_cylinders.vg.json
index a7a5a9086a..012ea1f980 100644
--- a/examples/compiled/selection_project_single_cylinders.vg.json
+++ b/examples/compiled/selection_project_single_cylinders.vg.json
@@ -20,7 +20,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -31,17 +30,9 @@
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"type\":\"E\"}]"
+ "value": [{"field": "Cylinders", "type": "E"}]
},
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_project_single_cylinders_origin.vg.json b/examples/compiled/selection_project_single_cylinders_origin.vg.json
index e727164f3b..1c3961313f 100644
--- a/examples/compiled/selection_project_single_cylinders_origin.vg.json
+++ b/examples/compiled/selection_project_single_cylinders_origin.vg.json
@@ -20,7 +20,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -31,17 +30,12 @@
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"type\":\"E\"},{\"field\":\"Origin\",\"type\":\"E\"}]"
- },
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
+ "value": [
+ {"field": "Cylinders", "type": "E"},
+ {"field": "Origin", "type": "E"}
]
- }
+ },
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_project_single_origin.vg.json b/examples/compiled/selection_project_single_origin.vg.json
index 430a7128fc..44327ed445 100644
--- a/examples/compiled/selection_project_single_origin.vg.json
+++ b/examples/compiled/selection_project_single_origin.vg.json
@@ -20,7 +20,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -29,19 +28,8 @@
}
]
},
- {
- "name": "pts_tuple_fields",
- "update": "[{\"field\":\"Origin\",\"type\":\"E\"}]"
- },
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_tuple_fields", "value": [{"field": "Origin", "type": "E"}]},
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_resolution_global.vg.json b/examples/compiled/selection_resolution_global.vg.json
index 4e6574b319..c958958f0d 100644
--- a/examples/compiled/selection_resolution_global.vg.json
+++ b/examples/compiled/selection_resolution_global.vg.json
@@ -155,13 +155,16 @@
{"signal": "brush_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -238,12 +241,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -553,13 +551,16 @@
{"signal": "brush_Acceleration"},
{"signal": "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"
+ "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -636,12 +637,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -899,7 +895,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Horsepower", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -976,12 +972,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -1288,13 +1279,16 @@
{"signal": "brush_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -1371,12 +1365,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -1634,7 +1623,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Acceleration", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -1711,12 +1700,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -2023,13 +2007,16 @@
{"signal": "brush_Horsepower"},
{"signal": "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"
+ "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -2106,12 +2093,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -2369,7 +2351,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -2446,12 +2428,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -2758,13 +2735,16 @@
{"signal": "brush_Acceleration"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -2841,12 +2821,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
@@ -3156,13 +3131,16 @@
{"signal": "brush_Horsepower"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -3239,12 +3217,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_resolution_intersect.vg.json b/examples/compiled/selection_resolution_intersect.vg.json
index 9fd442afe9..0941df2b99 100644
--- a/examples/compiled/selection_resolution_intersect.vg.json
+++ b/examples/compiled/selection_resolution_intersect.vg.json
@@ -158,13 +158,16 @@
{"signal": "brush_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -241,12 +244,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\"})"
}
],
"marks": [
@@ -508,13 +506,16 @@
{"signal": "brush_Acceleration"},
{"signal": "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"
+ "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -591,12 +592,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\"})"
}
],
"marks": [
@@ -806,7 +802,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Horsepower", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -883,12 +879,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\"})"
}
],
"marks": [
@@ -1147,13 +1138,16 @@
{"signal": "brush_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -1230,12 +1224,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\"})"
}
],
"marks": [
@@ -1445,7 +1434,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Acceleration", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -1522,12 +1511,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\"})"
}
],
"marks": [
@@ -1786,13 +1770,16 @@
{"signal": "brush_Horsepower"},
{"signal": "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"
+ "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -1869,12 +1856,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\"})"
}
],
"marks": [
@@ -2084,7 +2066,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -2161,12 +2143,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\"})"
}
],
"marks": [
@@ -2425,13 +2402,16 @@
{"signal": "brush_Acceleration"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -2508,12 +2488,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\"})"
}
],
"marks": [
@@ -2775,13 +2750,16 @@
{"signal": "brush_Horsepower"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -2858,12 +2836,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\"})"
}
],
"marks": [
diff --git a/examples/compiled/selection_resolution_union.vg.json b/examples/compiled/selection_resolution_union.vg.json
index c8a710b43f..9794ef2513 100644
--- a/examples/compiled/selection_resolution_union.vg.json
+++ b/examples/compiled/selection_resolution_union.vg.json
@@ -158,13 +158,16 @@
{"signal": "brush_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -241,12 +244,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Miles_per_Gallon\"})"
}
],
"marks": [
@@ -508,13 +506,16 @@
{"signal": "brush_Acceleration"},
{"signal": "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"
+ "update": "brush_Acceleration && brush_Horsepower ? {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\", fields: brush_tuple_fields, values: [brush_Acceleration,brush_Horsepower]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Horsepower\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Horsepower", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -591,12 +592,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Acceleration\"})"
}
],
"marks": [
@@ -806,7 +802,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Horsepower", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -883,12 +879,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Horsepower__repeat_column_Horsepower\"})"
}
],
"marks": [
@@ -1147,13 +1138,16 @@
{"signal": "brush_Miles_per_Gallon"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Miles_per_Gallon", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -1230,12 +1224,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Miles_per_Gallon\"})"
}
],
"marks": [
@@ -1445,7 +1434,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Acceleration", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -1522,12 +1511,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Acceleration\"})"
}
],
"marks": [
@@ -1786,13 +1770,16 @@
{"signal": "brush_Horsepower"},
{"signal": "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"
+ "update": "brush_Horsepower && brush_Acceleration ? {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Acceleration]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Acceleration\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Acceleration", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -1869,12 +1856,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Acceleration__repeat_column_Horsepower\"})"
}
],
"marks": [
@@ -2084,7 +2066,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Miles_per_Gallon\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -2161,12 +2143,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Miles_per_Gallon\"})"
}
],
"marks": [
@@ -2425,13 +2402,16 @@
{"signal": "brush_Acceleration"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Acceleration\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Acceleration", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -2508,12 +2488,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Acceleration\"})"
}
],
"marks": [
@@ -2775,13 +2750,16 @@
{"signal": "brush_Horsepower"},
{"signal": "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"
+ "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"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -2858,12 +2836,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\"})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child__repeat_row_Miles_per_Gallon__repeat_column_Horsepower\"})"
}
],
"marks": [
diff --git a/examples/compiled/selection_toggle_altKey.vg.json b/examples/compiled/selection_toggle_altKey.vg.json
index 0a3d2cc756..76cc35ed2e 100644
--- a/examples/compiled/selection_toggle_altKey.vg.json
+++ b/examples/compiled/selection_toggle_altKey.vg.json
@@ -28,7 +28,6 @@
},
{
"name": "paintbrush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -39,7 +38,7 @@
},
{
"name": "paintbrush_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "paintbrush_toggle",
@@ -53,12 +52,7 @@
},
{
"name": "paintbrush_modify",
- "on": [
- {
- "events": {"signal": "paintbrush_tuple"},
- "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
- }
- ]
+ "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json
index 139379c78b..fc1e900816 100644
--- a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json
+++ b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json
@@ -28,7 +28,6 @@
},
{
"name": "paintbrush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -39,7 +38,7 @@
},
{
"name": "paintbrush_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "paintbrush_toggle",
@@ -53,12 +52,7 @@
},
{
"name": "paintbrush_modify",
- "on": [
- {
- "events": {"signal": "paintbrush_tuple"},
- "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
- }
- ]
+ "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/selection_toggle_shiftKey.vg.json b/examples/compiled/selection_toggle_shiftKey.vg.json
index 69909351fd..10f808a907 100644
--- a/examples/compiled/selection_toggle_shiftKey.vg.json
+++ b/examples/compiled/selection_toggle_shiftKey.vg.json
@@ -28,7 +28,6 @@
},
{
"name": "paintbrush_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -39,7 +38,7 @@
},
{
"name": "paintbrush_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
+ "value": [{"field": "_vgsid_", "type": "E"}]
},
{
"name": "paintbrush_toggle",
@@ -53,12 +52,7 @@
},
{
"name": "paintbrush_modify",
- "on": [
- {
- "events": {"signal": "paintbrush_tuple"},
- "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
- }
- ]
+ "update": "modify(\"paintbrush_store\", paintbrush_toggle ? null : paintbrush_tuple, paintbrush_toggle ? null : true, paintbrush_toggle ? paintbrush_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json
index f5180405e7..d7e37323e9 100644
--- a/examples/compiled/selection_translate_brush_drag.vg.json
+++ b/examples/compiled/selection_translate_brush_drag.vg.json
@@ -140,13 +140,16 @@
{"signal": "brush_Horsepower"},
{"signal": "brush_Miles_per_Gallon"}
],
- "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower, brush_Miles_per_Gallon]} : null"
+ "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -219,12 +222,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json
index 584ed2b47c..6c4ab05871 100644
--- a/examples/compiled/selection_translate_brush_shift-drag.vg.json
+++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json
@@ -140,13 +140,16 @@
{"signal": "brush_Horsepower"},
{"signal": "brush_Miles_per_Gallon"}
],
- "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower, brush_Miles_per_Gallon]} : null"
+ "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -225,12 +228,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_translate_scatterplot_drag.vg.json b/examples/compiled/selection_translate_scatterplot_drag.vg.json
index da1749ecb2..497dc7ff5e 100644
--- a/examples/compiled/selection_translate_scatterplot_drag.vg.json
+++ b/examples/compiled/selection_translate_scatterplot_drag.vg.json
@@ -52,13 +52,16 @@
{"signal": "grid_Horsepower"},
{"signal": "grid_Miles_per_Gallon"}
],
- "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower, grid_Miles_per_Gallon]} : null"
+ "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -111,12 +114,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json
index 212141c3d3..c2015dc4df 100644
--- a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json
+++ b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json
@@ -52,13 +52,16 @@
{"signal": "grid_Horsepower"},
{"signal": "grid_Miles_per_Gallon"}
],
- "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower, grid_Miles_per_Gallon]} : null"
+ "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -121,12 +124,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_type_interval.vg.json b/examples/compiled/selection_type_interval.vg.json
index 25b0a28eff..ec4b109c05 100644
--- a/examples/compiled/selection_type_interval.vg.json
+++ b/examples/compiled/selection_type_interval.vg.json
@@ -145,13 +145,16 @@
"on": [
{
"events": [{"signal": "pts_Cylinders"}, {"signal": "pts_Origin"}],
- "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders, pts_Origin]} : null"
+ "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null"
}
]
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "channel": "x", "type": "E"},
+ {"field": "Origin", "channel": "y", "type": "E"}
+ ]
},
{
"name": "pts_translate_anchor",
@@ -222,15 +225,7 @@
}
]
},
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_type_interval_invert.vg.json b/examples/compiled/selection_type_interval_invert.vg.json
index a66dedd485..79278a3228 100644
--- a/examples/compiled/selection_type_interval_invert.vg.json
+++ b/examples/compiled/selection_type_interval_invert.vg.json
@@ -145,13 +145,16 @@
"on": [
{
"events": [{"signal": "pts_Cylinders"}, {"signal": "pts_Origin"}],
- "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders, pts_Origin]} : null"
+ "update": "pts_Cylinders && pts_Origin ? {unit: \"\", fields: pts_tuple_fields, values: [pts_Cylinders,pts_Origin]} : null"
}
]
},
{
"name": "pts_tuple_fields",
- "update": "[{\"field\":\"Cylinders\",\"channel\":\"x\",\"type\":\"E\"},{\"field\":\"Origin\",\"channel\":\"y\",\"type\":\"E\"}]"
+ "value": [
+ {"field": "Cylinders", "channel": "x", "type": "E"},
+ {"field": "Origin", "channel": "y", "type": "E"}
+ ]
},
{
"name": "pts_translate_anchor",
@@ -222,15 +225,7 @@
}
]
},
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_type_multi.vg.json b/examples/compiled/selection_type_multi.vg.json
index 1e486b8151..30f7e50e10 100644
--- a/examples/compiled/selection_type_multi.vg.json
+++ b/examples/compiled/selection_type_multi.vg.json
@@ -40,7 +40,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -49,10 +48,7 @@
}
]
},
- {
- "name": "pts_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
- },
+ {"name": "pts_tuple_fields", "value": [{"field": "_vgsid_", "type": "E"}]},
{
"name": "pts_toggle",
"value": false,
@@ -65,12 +61,7 @@
},
{
"name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
- }
- ]
+ "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
}
],
"marks": [
diff --git a/examples/compiled/selection_type_single.vg.json b/examples/compiled/selection_type_single.vg.json
index 8aabe89c8f..46bb6efc3e 100644
--- a/examples/compiled/selection_type_single.vg.json
+++ b/examples/compiled/selection_type_single.vg.json
@@ -40,7 +40,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -49,19 +48,8 @@
}
]
},
- {
- "name": "pts_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
- },
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_tuple_fields", "value": [{"field": "_vgsid_", "type": "E"}]},
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_type_single_dblclick.vg.json b/examples/compiled/selection_type_single_dblclick.vg.json
index c344892fca..515e09675e 100644
--- a/examples/compiled/selection_type_single_dblclick.vg.json
+++ b/examples/compiled/selection_type_single_dblclick.vg.json
@@ -40,7 +40,6 @@
{"name": "pts", "update": "vlSelectionResolve(\"pts_store\")"},
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "dblclick"}],
@@ -49,19 +48,8 @@
}
]
},
- {
- "name": "pts_tuple_fields",
- "update": "[{\"field\":\"_vgsid_\",\"type\":\"E\"}]"
- },
- {
- "name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_tuple, true)"
- }
- ]
- }
+ {"name": "pts_tuple_fields", "value": [{"field": "_vgsid_", "type": "E"}]},
+ {"name": "pts_modify", "update": "modify(\"pts_store\", pts_tuple, true)"}
],
"marks": [
{
diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json
index 6954146999..801a0074a7 100644
--- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json
+++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json
@@ -140,13 +140,16 @@
{"signal": "brush_Horsepower"},
{"signal": "brush_Miles_per_Gallon"}
],
- "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower, brush_Miles_per_Gallon]} : null"
+ "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -221,12 +224,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json
index f5180405e7..d7e37323e9 100644
--- a/examples/compiled/selection_zoom_brush_wheel.vg.json
+++ b/examples/compiled/selection_zoom_brush_wheel.vg.json
@@ -140,13 +140,16 @@
{"signal": "brush_Horsepower"},
{"signal": "brush_Miles_per_Gallon"}
],
- "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower, brush_Miles_per_Gallon]} : null"
+ "update": "brush_Horsepower && brush_Miles_per_Gallon ? {unit: \"\", fields: brush_tuple_fields, values: [brush_Horsepower,brush_Miles_per_Gallon]} : null"
}
]
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "brush_translate_anchor",
@@ -219,12 +222,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, true)"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json
index 55137c2e58..8de557b32f 100644
--- a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json
+++ b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json
@@ -52,13 +52,16 @@
{"signal": "grid_Horsepower"},
{"signal": "grid_Miles_per_Gallon"}
],
- "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower, grid_Miles_per_Gallon]} : null"
+ "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -125,12 +128,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json
index da1749ecb2..497dc7ff5e 100644
--- a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json
+++ b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json
@@ -52,13 +52,16 @@
{"signal": "grid_Horsepower"},
{"signal": "grid_Miles_per_Gallon"}
],
- "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower, grid_Miles_per_Gallon]} : null"
+ "update": "grid_Horsepower && grid_Miles_per_Gallon ? {unit: \"\", fields: grid_tuple_fields, values: [grid_Horsepower,grid_Miles_per_Gallon]} : null"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"Horsepower\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Miles_per_Gallon\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "Horsepower", "channel": "x", "type": "R"},
+ {"field": "Miles_per_Gallon", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -111,12 +114,7 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/trellis_selections.vg.json b/examples/compiled/trellis_selections.vg.json
index ac04df5e47..3cb43a99ee 100644
--- a/examples/compiled/trellis_selections.vg.json
+++ b/examples/compiled/trellis_selections.vg.json
@@ -30,7 +30,7 @@
},
{
"name": "xenc_X",
- "value": "",
+ "value": null,
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
@@ -209,7 +209,7 @@
},
{
"name": "brush_tuple_fields",
- "update": "[{\"field\":\"X\",\"channel\":\"x\",\"type\":\"R\"}]"
+ "value": [{"field": "X", "channel": "x", "type": "R"}]
},
{
"name": "brush_translate_anchor",
@@ -287,12 +287,7 @@
},
{
"name": "brush_modify",
- "on": [
- {
- "events": {"signal": "brush_tuple"},
- "update": "modify(\"brush_store\", brush_tuple, {unit: \"child\" + '__facet_column_' + (facet[\"Series\"])})"
- }
- ]
+ "update": "modify(\"brush_store\", brush_tuple, {unit: \"child\" + '__facet_column_' + (facet[\"Series\"])})"
},
{
"name": "grid_X",
@@ -327,13 +322,16 @@
"on": [
{
"events": [{"signal": "grid_X"}, {"signal": "grid_Y"}],
- "update": "grid_X && grid_Y ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: grid_tuple_fields, values: [grid_X, grid_Y]} : null"
+ "update": "grid_X && grid_Y ? {unit: \"child\" + '__facet_column_' + (facet[\"Series\"]), fields: grid_tuple_fields, values: [grid_X,grid_Y]} : null"
}
]
},
{
"name": "grid_tuple_fields",
- "update": "[{\"field\":\"X\",\"channel\":\"x\",\"type\":\"R\"},{\"field\":\"Y\",\"channel\":\"y\",\"type\":\"R\"}]"
+ "value": [
+ {"field": "X", "channel": "x", "type": "R"},
+ {"field": "Y", "channel": "y", "type": "R"}
+ ]
},
{
"name": "grid_translate_anchor",
@@ -395,29 +393,16 @@
},
{
"name": "grid_modify",
- "on": [
- {
- "events": {"signal": "grid_tuple"},
- "update": "modify(\"grid_store\", grid_tuple, true)"
- }
- ]
+ "update": "modify(\"grid_store\", grid_tuple, true)"
},
{
"name": "xenc_tuple",
"update": "xenc_X !== null ? {fields: xenc_tuple_fields, values: [xenc_X]} : null"
},
- {
- "name": "xenc_tuple_fields",
- "update": "[{\"field\":\"X\",\"type\":\"E\"}]"
- },
+ {"name": "xenc_tuple_fields", "value": [{"field": "X", "type": "E"}]},
{
"name": "xenc_modify",
- "on": [
- {
- "events": {"signal": "xenc_tuple"},
- "update": "modify(\"xenc_store\", xenc_tuple, true)"
- }
- ]
+ "update": "modify(\"xenc_store\", xenc_tuple, true)"
}
],
"marks": [
diff --git a/examples/compiled/vconcat_flatten.vg.json b/examples/compiled/vconcat_flatten.vg.json
index 6c8d730d68..49a320fa8f 100644
--- a/examples/compiled/vconcat_flatten.vg.json
+++ b/examples/compiled/vconcat_flatten.vg.json
@@ -101,7 +101,6 @@
"signals": [
{
"name": "pts_tuple",
- "value": {},
"on": [
{
"events": [{"source": "scope", "type": "click"}],
@@ -110,10 +109,7 @@
}
]
},
- {
- "name": "pts_tuple_fields",
- "update": "[{\"field\":\"id\",\"type\":\"E\"}]"
- },
+ {"name": "pts_tuple_fields", "value": [{"field": "id", "type": "E"}]},
{
"name": "pts_toggle",
"value": false,
@@ -126,12 +122,7 @@
},
{
"name": "pts_modify",
- "on": [
- {
- "events": {"signal": "pts_tuple"},
- "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
- }
- ]
+ "update": "modify(\"pts_store\", pts_toggle ? null : pts_tuple, pts_toggle ? null : true, pts_toggle ? pts_tuple : null)"
}
],
"marks": [
diff --git a/examples/specs/interactive_brush.vl.json b/examples/specs/interactive_brush.vl.json
index 04246ebaf6..80b3e08007 100644
--- a/examples/specs/interactive_brush.vl.json
+++ b/examples/specs/interactive_brush.vl.json
@@ -4,7 +4,8 @@
"data": {"url": "data/cars.json"},
"selection": {
"brush": {
- "type": "interval"
+ "type": "interval",
+ "init": {"x": [55, 160], "y": [13, 37]}
}
},
"mark": "point",
diff --git a/examples/specs/interactive_query_widgets.vl.json b/examples/specs/interactive_query_widgets.vl.json
index 49e0f7dab8..0a76106d8e 100644
--- a/examples/specs/interactive_query_widgets.vl.json
+++ b/examples/specs/interactive_query_widgets.vl.json
@@ -7,6 +7,7 @@
"selection": {
"CylYr": {
"type": "single", "fields": ["Cylinders", "Year"],
+ "init": {"Cylinders": 4, "Year": 1977},
"bind": {
"Cylinders": {"input": "range", "min": 3, "max": 8, "step": 1},
"Year": {"input": "range", "min": 1969, "max": 1981, "step": 1}
diff --git a/src/compile/selection/interval.ts b/src/compile/selection/interval.ts
index 649b696e24..01fa166614 100644
--- a/src/compile/selection/interval.ts
+++ b/src/compile/selection/interval.ts
@@ -6,6 +6,7 @@ import {keys} from '../../util';
import {EventStream} from '../../vega.schema';
import {UnitModel} from '../unit';
import {
+ assembleInit,
channelSignalName,
positionalProjections,
SelectionCompiler,
@@ -20,7 +21,7 @@ import scales from './transforms/scales';
export const BRUSH = '_brush';
export const SCALE_TRIGGER = '_scale_trigger';
-const interval: SelectionCompiler = {
+const interval: SelectionCompiler<'interval'> = {
signals: (model, selCmpt) => {
const name = selCmpt.name;
const fieldsSg = name + TUPLE + TUPLE_FIELDS;
@@ -39,14 +40,14 @@ const interval: SelectionCompiler = {
});
}
- for (const p of selCmpt.project) {
+ selCmpt.project.forEach((p, i) => {
const channel = p.channel;
if (channel !== X && channel !== Y) {
warn('Interval selections only support x and y encoding channels.');
- continue;
+ return;
}
- const cs = channelSignals(model, selCmpt, channel);
+ const cs = channelSignals(model, selCmpt, channel, i);
const dname = channelSignalName(selCmpt, channel, 'data');
const vname = channelSignalName(selCmpt, channel, 'visual');
const scaleStr = stringValue(model.scaleName(channel));
@@ -63,7 +64,7 @@ const interval: SelectionCompiler = {
`(${toNum}invert(${scaleStr}, ${vname})[0] === ${toNum}${dname}[0] && ` +
`${toNum}invert(${scaleStr}, ${vname})[1] === ${toNum}${dname}[1]))`
});
- }
+ });
// Proxy scale reactions to ensure that an infinite loop doesn't occur
// when an interval selection filter touches the scale.
@@ -77,15 +78,15 @@ const interval: SelectionCompiler = {
// Only add an interval to the store if it has valid data extents. Data extents
// are set to null if pixel extents are equal to account for intervals over
// ordinal/nominal domains which, when inverted, will still produce a valid datum.
+ const init = selCmpt.init;
+ const update = `unit: ${unitName(model)}, fields: ${fieldsSg}, values`;
return signals.concat({
name: name + TUPLE,
+ ...(init ? {init: `{${update}: ${assembleInit(init)}}`} : {}),
on: [
{
events: dataSignals.map(t => ({signal: t})),
- update:
- dataSignals.join(' && ') +
- ` ? {unit: ${unitName(model)}, fields: ${fieldsSg}, ` +
- `values: [${dataSignals.join(', ')}]} : null`
+ update: dataSignals.join(' && ') + ` ? {${update}: [${dataSignals}]} : null`
}
]
});
@@ -179,14 +180,20 @@ export default interval;
/**
* Returns the visual and data signals for an interval selection.
*/
-function channelSignals(model: UnitModel, selCmpt: SelectionComponent, channel: 'x' | 'y'): any {
+function channelSignals(
+ model: UnitModel,
+ selCmpt: SelectionComponent<'interval'>,
+ channel: 'x' | 'y',
+ idx: number
+): any {
const vname = channelSignalName(selCmpt, channel, 'visual');
const dname = channelSignalName(selCmpt, channel, 'data');
+ const init = selCmpt.init && selCmpt.init[idx];
const hasScales = scales.has(selCmpt);
- const scaleName = model.scaleName(channel);
- const scaleStr = stringValue(scaleName);
+ const scaleName = stringValue(model.scaleName(channel));
const scale = model.getScaleComponent(channel);
const scaleType = scale ? scale.get('type') : undefined;
+ const scaled = (str: string) => `scale(${scaleName}, ${str})`;
const size = model.getSizeSignalRef(channel === X ? 'width' : 'height').signal;
const coord = `${channel}(unit)`;
@@ -205,7 +212,7 @@ function channelSignals(model: UnitModel, selCmpt: SelectionComponent, channel:
events: {signal: selCmpt.name + SCALE_TRIGGER},
update:
hasContinuousDomain(scaleType) && !isBinScale(scaleType)
- ? `[scale(${scaleStr}, ${dname}[0]), scale(${scaleStr}, ${dname}[1])]`
+ ? `[${scaled(`${dname}[0]`)}, ${scaled(`${dname}[1]`)}]`
: `[0, 0]`
});
@@ -214,17 +221,23 @@ function channelSignals(model: UnitModel, selCmpt: SelectionComponent, channel:
: [
{
name: vname,
- value: [],
+ ...(init ? {init: assembleInit(init, scaled)} : {value: []}),
on: on
},
{
name: dname,
- on: [{events: {signal: vname}, update: `${vname}[0] === ${vname}[1] ? null : invert(${scaleStr}, ${vname})`}]
+ ...(init ? {init: assembleInit(init)} : {}),
+ on: [
+ {
+ events: {signal: vname},
+ update: `${vname}[0] === ${vname}[1] ? null : invert(${scaleName}, ${vname})`
+ }
+ ]
}
];
}
-function events(selCmpt: SelectionComponent, cb: (...args: any[]) => void) {
+function events(selCmpt: SelectionComponent<'interval'>, cb: (...args: any[]) => void) {
return selCmpt.events.reduce((on: any[], evt: EventStream) => {
if (!evt.between) {
warn(`${evt} is not an ordered event stream for interval selections`);
diff --git a/src/compile/selection/multi.ts b/src/compile/selection/multi.ts
index 524f787e06..17aa77c446 100644
--- a/src/compile/selection/multi.ts
+++ b/src/compile/selection/multi.ts
@@ -1,9 +1,11 @@
+import {stringValue} from 'vega-util';
+import {SelectionInit} from '../../selection';
import {accessPathWithDatum} from '../../util';
import {UnitModel} from '../unit';
-import {SelectionCompiler, SelectionComponent, TUPLE, unitName} from './selection';
+import {assembleInit, SelectionCompiler, SelectionComponent, STORE, TUPLE, unitName} from './selection';
import {TUPLE_FIELDS} from './transforms/project';
-export function signals(model: UnitModel, selCmpt: SelectionComponent) {
+export function singleOrMultiSignals(model: UnitModel, selCmpt: SelectionComponent<'single' | 'multi'>) {
const name = selCmpt.name;
const fieldsSg = name + TUPLE + TUPLE_FIELDS;
const proj = selCmpt.project;
@@ -26,25 +28,36 @@ export function signals(model: UnitModel, selCmpt: SelectionComponent) {
// for constant null states but varying toggles (e.g., shift-click in
// whitespace followed by a click in whitespace; the store should only
// be cleared on the second click).
- return [
+ const update = `unit: ${unitName(model)}, fields: ${fieldsSg}, values`;
+ const signals: any[] = [
{
name: name + TUPLE,
- value: {},
on: [
{
events: selCmpt.events,
- update:
- `datum && item().mark.marktype !== 'group' ? ` +
- `{unit: ${unitName(model)}, fields: ${fieldsSg}, values: [${values}]} : null`,
+ update: `datum && item().mark.marktype !== 'group' ? {${update}: [${values}]} : null`,
force: true
}
]
}
];
+
+ if (selCmpt.init) {
+ const insert = selCmpt.init.map((i: SelectionInit | SelectionInit[]) => {
+ const str = assembleInit(i);
+ return `{${update}: ${str}}`;
+ });
+ signals.push({
+ name: `${name}_init`,
+ init: `modify(${stringValue(selCmpt.name + STORE)}, [${insert}])`
+ });
+ }
+
+ return signals;
}
-const multi: SelectionCompiler = {
- signals: signals,
+const multi: SelectionCompiler<'multi'> = {
+ signals: singleOrMultiSignals,
modifyExpr: (model, selCmpt) => {
const tpl = selCmpt.name + TUPLE;
diff --git a/src/compile/selection/selection.ts b/src/compile/selection/selection.ts
index dd20a6f08c..b2c3d0bcc3 100644
--- a/src/compile/selection/selection.ts
+++ b/src/compile/selection/selection.ts
@@ -1,10 +1,19 @@
import {Binding, NewSignal, SignalRef} from 'vega';
import {selector as parseSelector} from 'vega-event-selector';
-import {isString, stringValue} from 'vega-util';
+import {identity, isArray, isString, stringValue} from 'vega-util';
import {Channel, FACET_CHANNELS, ScaleChannel, SingleDefChannel, X, Y} from '../../channel';
+import {dateTimeExpr, isDateTime} from '../../datetime';
import {warn} from '../../log';
import {LogicalOperand} from '../../logical';
-import {BrushConfig, SELECTION_ID, SelectionDef, SelectionResolution, SelectionType} from '../../selection';
+import {
+ BrushConfig,
+ SELECTION_ID,
+ SelectionDef,
+ SelectionInit,
+ SelectionInitArray,
+ SelectionResolution,
+ SelectionType
+} from '../../selection';
import {accessPathWithDatum, Dict, duplicate, keys, logicalExpr, varName} from '../../util';
import {EventStream, VgData} from '../../vega.schema';
import {DataFlowNode} from '../data/dataflow';
@@ -25,9 +34,17 @@ export const MODIFY = '_modify';
export const SELECTION_DOMAIN = '_selection_domain_';
export const VL_SELECTION_RESOLVE = 'vlSelectionResolve';
-export interface SelectionComponent {
+export interface SelectionComponent {
name: string;
- type: SelectionType;
+ type: T;
+
+ // Use conditional typing (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html)
+ // so we have stricter type of init (as the type of init depends on selection type)
+ init?: (T extends 'interval'
+ ? SelectionInitArray //
+ : T extends 'single'
+ ? SelectionInit
+ : SelectionInit | SelectionInit[])[]; // multi
events: EventStream;
// predicate?: string;
bind?: 'scales' | Binding | Dict;
@@ -58,15 +75,15 @@ export interface ProjectSelectionComponent {
type: TupleStoreType;
}
-export interface SelectionCompiler {
- signals: (model: UnitModel, selCmpt: SelectionComponent) => NewSignal[];
- topLevelSignals?: (model: Model, selCmpt: SelectionComponent, signals: NewSignal[]) => NewSignal[];
- modifyExpr: (model: UnitModel, selCmpt: SelectionComponent) => string;
- marks?: (model: UnitModel, selCmpt: SelectionComponent, marks: any[]) => any[];
+export interface SelectionCompiler {
+ signals: (model: UnitModel, selCmpt: SelectionComponent) => NewSignal[];
+ topLevelSignals?: (model: Model, selCmpt: SelectionComponent, signals: NewSignal[]) => NewSignal[];
+ modifyExpr: (model: UnitModel, selCmpt: SelectionComponent) => string;
+ marks?: (model: UnitModel, selCmpt: SelectionComponent, marks: any[]) => any[];
}
export function parseUnitSelection(model: UnitModel, selDefs: Dict) {
- const selCmpts: Dict = {};
+ const selCmpts: Dict> = {};
const selectionConfig = model.config.selection;
if (selDefs) {
@@ -136,12 +153,7 @@ export function assembleUnitSelectionSignals(model: UnitModel, signals: any[]) {
signals.push({
name: name + MODIFY,
- on: [
- {
- events: {signal: name + TUPLE},
- update: `modify(${stringValue(selCmpt.name + STORE)}, ${modifyExpr})`
- }
- ]
+ update: `modify(${stringValue(selCmpt.name + STORE)}, ${modifyExpr})`
});
});
@@ -413,3 +425,16 @@ export function positionalProjections(selCmpt: SelectionComponent) {
});
return {x, xi, y, yi};
}
+
+export function assembleInit(
+ init: (SelectionInit | SelectionInit[] | SelectionInitArray)[] | SelectionInit,
+ wrap: (str: string) => string = identity
+): string {
+ if (isArray(init)) {
+ const str = init.map(v => assembleInit(v, wrap)).join(', ');
+ return `[${str}]`;
+ } else if (isDateTime(init)) {
+ return wrap(dateTimeExpr(init));
+ }
+ return wrap(JSON.stringify(init));
+}
diff --git a/src/compile/selection/single.ts b/src/compile/selection/single.ts
index 51885bd77e..5c4683353e 100644
--- a/src/compile/selection/single.ts
+++ b/src/compile/selection/single.ts
@@ -1,8 +1,8 @@
-import {signals as multiSignals} from './multi';
+import {singleOrMultiSignals} from './multi';
import {SelectionCompiler, TUPLE, unitName} from './selection';
-const single: SelectionCompiler = {
- signals: multiSignals,
+const single: SelectionCompiler<'single'> = {
+ signals: singleOrMultiSignals,
modifyExpr: (model, selCmpt) => {
const tpl = selCmpt.name + TUPLE;
diff --git a/src/compile/selection/transforms/inputs.ts b/src/compile/selection/transforms/inputs.ts
index 2cfa4f46bd..a3ccd63dcd 100644
--- a/src/compile/selection/transforms/inputs.ts
+++ b/src/compile/selection/transforms/inputs.ts
@@ -1,5 +1,5 @@
import {accessPathWithDatum, varName} from '../../../util';
-import {TUPLE} from '../selection';
+import {assembleInit, TUPLE} from '../selection';
import nearest from './nearest';
import {TUPLE_FIELDS} from './project';
import {TransformCompiler} from './transforms';
@@ -13,15 +13,16 @@ const inputBindings: TransformCompiler = {
const name = selCmpt.name;
const proj = selCmpt.project;
const bind = selCmpt.bind;
+ const init = selCmpt.init && selCmpt.init[0]; // Can only exist on single selections (one initial value).
const datum = nearest.has(selCmpt) ? '(item().isVoronoi ? datum.datum : datum)' : 'datum';
- for (const p of proj) {
+ proj.forEach((p, i) => {
const sgname = varName(`${name}_${p.field}`);
const hasSignal = signals.filter(s => s.name === sgname);
if (!hasSignal.length) {
signals.unshift({
name: sgname,
- value: '',
+ ...(init ? {init: assembleInit(init[i])} : {value: null}),
on: [
{
events: selCmpt.events,
@@ -31,7 +32,7 @@ const inputBindings: TransformCompiler = {
bind: bind[p.field] || bind[p.channel] || bind
});
}
- }
+ });
return signals;
},
diff --git a/src/compile/selection/transforms/project.ts b/src/compile/selection/transforms/project.ts
index 741175139f..c4ba95a7ba 100644
--- a/src/compile/selection/transforms/project.ts
+++ b/src/compile/selection/transforms/project.ts
@@ -1,10 +1,12 @@
+import {isArray} from 'vega-util';
import {ScaleChannel} from '../../../channel';
import * as log from '../../../log';
import {hasContinuousDomain, isBinScale} from '../../../scale';
-import {SelectionDef} from '../../../selection';
+import {isIntervalSelection, SelectionDef, SelectionInitArrayMapping, SelectionInitMapping} from '../../../selection';
import {Dict, keys} from '../../../util';
import {TimeUnitComponent, TimeUnitNode} from '../../data/timeunit';
import {ProjectSelectionComponent, SelectionComponent, TUPLE, TupleStoreType} from '../selection';
+import scales from './scales';
import {TransformCompiler} from './transforms';
export const TUPLE_FIELDS = '_fields';
@@ -18,12 +20,14 @@ const project: TransformCompiler = {
parse: (model, selDef, selCmpt) => {
const timeUnits: Dict = {};
const f: Dict = {};
- const p = selCmpt.project || (selCmpt.project = []);
+
+ // Selection component may already have a projection from the config. (Interval selection will have `encodings: ['x', 'y'].)
+ const proj = selCmpt.project || (selCmpt.project = []);
selCmpt.fields = {};
// TODO: find a possible channel mapping for these fields.
if (selDef.fields) {
- p.push(...selDef.fields.map(field => ({field, type: 'E'})));
+ proj.push(...selDef.fields.map(field => ({field, type: 'E'})));
}
for (const channel of selDef.encodings || []) {
@@ -60,7 +64,7 @@ const project: TransformCompiler = {
type = 'R-RE';
}
- p.push((f[field] = {field, channel, type}));
+ proj.push((f[field] = {field, channel, type}));
}
selCmpt.fields[channel] = field;
@@ -69,6 +73,23 @@ const project: TransformCompiler = {
}
}
+ if (selDef.init) {
+ if (scales.has(selCmpt)) {
+ log.warn(log.message.NO_INIT_SCALE_BINDINGS);
+ } else {
+ function parseInit(i: T): T['a'][] {
+ return proj.map(p => (i[p.channel] !== undefined ? i[p.channel] : i[p.field]));
+ }
+
+ if (isIntervalSelection(selDef)) {
+ selCmpt.init = parseInit(selDef.init);
+ } else {
+ const init = isArray(selDef.init) ? selDef.init : [selDef.init];
+ selCmpt.init = init.map(parseInit);
+ }
+ }
+ }
+
if (keys(timeUnits).length) {
selCmpt.timeUnit = new TimeUnitNode(null, timeUnits);
}
@@ -81,7 +102,7 @@ const project: TransformCompiler = {
? signals
: signals.concat({
name,
- update: `${JSON.stringify(selCmpt.project)}`
+ value: selCmpt.project
});
}
};
diff --git a/src/log.ts b/src/log.ts
index bc8c54b376..145d17f06b 100644
--- a/src/log.ts
+++ b/src/log.ts
@@ -119,6 +119,8 @@ export namespace message {
export const SCALE_BINDINGS_CONTINUOUS =
'Scale bindings are currently only supported for scales with unbinned, continuous domains.';
+ export const NO_INIT_SCALE_BINDINGS = 'Selections bound to scales cannot be separately initialized.';
+
// REPEAT
export function noSuchRepeatedValue(field: string) {
return `Unknown repeated value "${field}".`;
diff --git a/src/selection.ts b/src/selection.ts
index acb0d5b6d8..ea0714558c 100644
--- a/src/selection.ts
+++ b/src/selection.ts
@@ -1,11 +1,22 @@
import {Binding} from 'vega';
import {SingleDefChannel} from './channel';
+import {DateTime} from './datetime';
import {EventStream} from './vega.schema';
export const SELECTION_ID = '_vgsid_';
export type SelectionType = 'single' | 'multi' | 'interval';
export type SelectionResolution = 'global' | 'union' | 'intersect';
+export type SelectionInit = boolean | number | string | DateTime;
+export type SelectionInitArray = boolean[] | number[] | string[] | DateTime[];
+export interface SelectionInitMapping {
+ [key: string]: SelectionInit;
+}
+
+export interface SelectionInitArrayMapping {
+ [key: string]: SelectionInitArray;
+}
+
export interface BaseSelectionDef {
/**
* A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection.
@@ -63,6 +74,11 @@ export interface SingleSelectionConfig extends BaseSelectionDef {
* See the [nearest transform](https://vega.github.io/vega-lite/docs/nearest.html) documentation for more information.
*/
nearest?: boolean;
+
+ /**
+ * Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and initial values.
+ */
+ init?: SelectionInitMapping;
}
export interface MultiSelectionConfig extends BaseSelectionDef {
@@ -85,6 +101,12 @@ export interface MultiSelectionConfig extends BaseSelectionDef {
* See the [nearest transform](https://vega.github.io/vega-lite/docs/nearest.html) documentation for more information.
*/
nearest?: boolean;
+
+ /**
+ * Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and an initial
+ * value (or array of values).
+ */
+ init?: SelectionInitMapping | SelectionInitMapping[];
}
export interface BrushConfig {
@@ -163,6 +185,12 @@ export interface IntervalSelectionConfig extends BaseSelectionDef {
* appearance of the mark.
*/
mark?: BrushConfig;
+
+ /**
+ * Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and arrays of
+ * initial values.
+ */
+ init?: SelectionInitArrayMapping;
}
export interface SingleSelection extends SingleSelectionConfig {
@@ -179,6 +207,10 @@ export interface IntervalSelection extends IntervalSelectionConfig {
export type SelectionDef = SingleSelection | MultiSelection | IntervalSelection;
+export function isIntervalSelection(s: SelectionDef): s is IntervalSelection {
+ return s.type === 'interval';
+}
+
export interface SelectionConfig {
/**
* The default definition for a [`single`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations
diff --git a/test/compile/selection/inputs.test.ts b/test/compile/selection/inputs.test.ts
index 824068b83c..78d01e0198 100644
--- a/test/compile/selection/inputs.test.ts
+++ b/test/compile/selection/inputs.test.ts
@@ -41,6 +41,16 @@ describe('Inputs Selection Transform', () => {
six: {
type: 'interval',
bind: 'scales'
+ },
+ seven: {
+ type: 'single',
+ fields: ['Year'],
+ bind: {
+ Year: {input: 'range', min: 1970, max: 1980, step: 1}
+ },
+ init: {
+ Year: {year: 1970, month: 1, day: 1}
+ }
}
});
@@ -50,6 +60,7 @@ describe('Inputs Selection Transform', () => {
expect(inputs.has(selCmpts['three'])).toBeTruthy();
expect(inputs.has(selCmpts['four'])).toBeFalsy();
expect(inputs.has(selCmpts['six'])).toBeFalsy();
+ expect(inputs.has(selCmpts['seven'])).toBeTruthy();
});
it('adds widget binding for default projection', () => {
@@ -61,7 +72,7 @@ describe('Inputs Selection Transform', () => {
expect(selection.assembleTopLevelSignals(model, [])).toContainEqual({
name: 'one__vgsid_',
- value: '',
+ value: null,
on: [
{
events: [{source: 'scope', type: 'click'}],
@@ -84,7 +95,7 @@ describe('Inputs Selection Transform', () => {
expect.arrayContaining([
{
name: 'two_Horsepower',
- value: '',
+ value: null,
on: [
{
events: [{source: 'scope', type: 'click'}],
@@ -95,7 +106,7 @@ describe('Inputs Selection Transform', () => {
},
{
name: 'two_Cylinders',
- value: '',
+ value: null,
on: [
{
events: [{source: 'scope', type: 'click'}],
@@ -120,7 +131,7 @@ describe('Inputs Selection Transform', () => {
expect.arrayContaining([
{
name: 'three_Origin',
- value: '',
+ value: null,
on: [
{
events: [{source: 'scope', type: 'click'}],
@@ -135,7 +146,7 @@ describe('Inputs Selection Transform', () => {
},
{
name: 'three_Cylinders',
- value: '',
+ value: null,
on: [
{
events: [{source: 'scope', type: 'click'}],
@@ -154,4 +165,32 @@ describe('Inputs Selection Transform', () => {
])
);
});
+
+ it('respects initialization', () => {
+ model.component.selection = {seven: selCmpts['seven']};
+ expect(selection.assembleUnitSelectionSignals(model, [])).toEqual(
+ expect.arrayContaining([
+ {
+ name: 'seven_tuple',
+ update: 'seven_Year !== null ? {fields: seven_tuple_fields, values: [seven_Year]} : null'
+ }
+ ])
+ );
+
+ expect(selection.assembleTopLevelSignals(model, [])).toEqual(
+ expect.arrayContaining([
+ {
+ name: 'seven_Year',
+ init: 'datetime(1970, 1, 1+1, 0, 0, 0, 0)',
+ on: [
+ {
+ events: [{source: 'scope', type: 'click'}],
+ update: 'datum && item().mark.marktype !== \'group\' ? datum["Year"] : null'
+ }
+ ],
+ bind: {input: 'range', min: 1970, max: 1980, step: 1}
+ }
+ ])
+ );
+ });
});
diff --git a/test/compile/selection/interval.test.ts b/test/compile/selection/interval.test.ts
index 94ab799e63..0fe8cd2a36 100644
--- a/test/compile/selection/interval.test.ts
+++ b/test/compile/selection/interval.test.ts
@@ -41,6 +41,28 @@ describe('Interval Selections', () => {
strokeDashOffset: 3,
strokeOpacity: 0.25
}
+ },
+ four: {
+ type: 'interval',
+ translate: false,
+ zoom: false,
+ encodings: ['x'],
+ init: {x: [50, 70]}
+ },
+ five: {
+ type: 'interval',
+ translate: false,
+ zoom: false,
+ init: {x: [50, 60], y: [23, 54]}
+ },
+ six: {
+ type: 'interval',
+ translate: false,
+ zoom: false,
+ encodings: ['x'],
+ init: {
+ x: [{year: 2000, month: 10, day: 5}, {year: 2001, month: 1, day: 13}]
+ }
}
}));
@@ -170,6 +192,151 @@ describe('Interval Selections', () => {
}
])
);
+
+ const fourSg = interval.signals(model, selCmpts['four']);
+ expect(fourSg).toEqual(
+ expect.arrayContaining([
+ {
+ name: 'four_x',
+ init: '[scale("x", 50), scale("x", 70)]',
+ on: [
+ {
+ events: parseSelector('mousedown', 'scope')[0],
+ update: '[x(unit), x(unit)]'
+ },
+ {
+ events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0],
+ update: '[four_x[0], clamp(x(unit), 0, width)]'
+ },
+ {
+ events: {signal: 'four_scale_trigger'},
+ update: '[scale("x", four_Horsepower[0]), scale("x", four_Horsepower[1])]'
+ }
+ ]
+ },
+ {
+ name: 'four_Horsepower',
+ init: '[50, 70]',
+ on: [
+ {
+ events: {signal: 'four_x'},
+ update: 'four_x[0] === four_x[1] ? null : invert("x", four_x)'
+ }
+ ]
+ },
+ {
+ name: 'four_scale_trigger',
+ update:
+ '(!isArray(four_Horsepower) || (+invert("x", four_x)[0] === +four_Horsepower[0] && +invert("x", four_x)[1] === +four_Horsepower[1])) ? four_scale_trigger : {}'
+ }
+ ])
+ );
+
+ const fiveSg = interval.signals(model, selCmpts['five']);
+ expect(fiveSg).toEqual(
+ expect.arrayContaining([
+ {
+ name: 'five_x',
+ init: '[scale("x", 50), scale("x", 60)]',
+ on: [
+ {
+ events: parseSelector('mousedown', 'scope')[0],
+ update: '[x(unit), x(unit)]'
+ },
+ {
+ events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0],
+ update: '[five_x[0], clamp(x(unit), 0, width)]'
+ },
+ {
+ events: {signal: 'five_scale_trigger'},
+ update: '[scale("x", five_Horsepower[0]), scale("x", five_Horsepower[1])]'
+ }
+ ]
+ },
+ {
+ name: 'five_Horsepower',
+ init: '[50, 60]',
+ on: [
+ {
+ events: {signal: 'five_x'},
+ update: 'five_x[0] === five_x[1] ? null : invert("x", five_x)'
+ }
+ ]
+ },
+ {
+ name: 'five_y',
+ init: '[scale("y", 23), scale("y", 54)]',
+ on: [
+ {
+ events: parseSelector('mousedown', 'scope')[0],
+ update: '[y(unit), y(unit)]'
+ },
+ {
+ events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0],
+ update: '[five_y[0], clamp(y(unit), 0, height)]'
+ },
+ {
+ events: {signal: 'five_scale_trigger'},
+ update: '[scale("y", five_Miles_per_Gallon[0]), scale("y", five_Miles_per_Gallon[1])]'
+ }
+ ]
+ },
+ {
+ name: 'five_Miles_per_Gallon',
+ init: '[23, 54]',
+ on: [
+ {
+ events: {signal: 'five_y'},
+ update: 'five_y[0] === five_y[1] ? null : invert("y", five_y)'
+ }
+ ]
+ },
+ {
+ name: 'five_scale_trigger',
+ update:
+ '(!isArray(five_Horsepower) || (+invert("x", five_x)[0] === +five_Horsepower[0] && +invert("x", five_x)[1] === +five_Horsepower[1])) && (!isArray(five_Miles_per_Gallon) || (+invert("y", five_y)[0] === +five_Miles_per_Gallon[0] && +invert("y", five_y)[1] === +five_Miles_per_Gallon[1])) ? five_scale_trigger : {}'
+ }
+ ])
+ );
+
+ const sixSg = interval.signals(model, selCmpts['six']);
+ expect(sixSg).toEqual(
+ expect.arrayContaining([
+ {
+ name: 'six_x',
+ init: '[scale("x", datetime(2000, 10, 5+1, 0, 0, 0, 0)), scale("x", datetime(2001, 1, 13+1, 0, 0, 0, 0))]',
+ on: [
+ {
+ events: parseSelector('mousedown', 'scope')[0],
+ update: '[x(unit), x(unit)]'
+ },
+ {
+ events: parseSelector('[mousedown, window:mouseup] > window:mousemove!', 'scope')[0],
+ update: '[six_x[0], clamp(x(unit), 0, width)]'
+ },
+ {
+ events: {signal: 'six_scale_trigger'},
+ update: '[scale("x", six_Horsepower[0]), scale("x", six_Horsepower[1])]'
+ }
+ ]
+ },
+ {
+ name: 'six_Horsepower',
+ init: '[datetime(2000, 10, 5+1, 0, 0, 0, 0), datetime(2001, 1, 13+1, 0, 0, 0, 0)]',
+ on: [
+ {
+ events: {signal: 'six_x'},
+ update: 'six_x[0] === six_x[1] ? null : invert("x", six_x)'
+ }
+ ]
+ },
+ {
+ name: 'six_scale_trigger',
+ update:
+ '(!isArray(six_Horsepower) || (+invert("x", six_x)[0] === +six_Horsepower[0] && +invert("x", six_x)[1] === +six_Horsepower[1])) ? six_scale_trigger : {}'
+ }
+ ])
+ );
});
it('builds trigger signals', () => {
@@ -202,7 +369,32 @@ describe('Interval Selections', () => {
{
events: [{signal: 'thr_ee_Horsepower'}, {signal: 'thr_ee_Miles_per_Gallon'}],
update:
- 'thr_ee_Horsepower && thr_ee_Miles_per_Gallon ? {unit: "", fields: thr_ee_tuple_fields, values: [thr_ee_Horsepower, thr_ee_Miles_per_Gallon]} : null'
+ 'thr_ee_Horsepower && thr_ee_Miles_per_Gallon ? {unit: "", fields: thr_ee_tuple_fields, values: [thr_ee_Horsepower,thr_ee_Miles_per_Gallon]} : null'
+ }
+ ]
+ });
+
+ const fourSg = interval.signals(model, selCmpts['four']);
+ expect(fourSg).toContainEqual({
+ name: 'four_tuple',
+ init: '{unit: "", fields: four_tuple_fields, values: [[50, 70]]}',
+ on: [
+ {
+ events: [{signal: 'four_Horsepower'}],
+ update: 'four_Horsepower ? {unit: "", fields: four_tuple_fields, values: [four_Horsepower]} : null'
+ }
+ ]
+ });
+
+ const fiveSg = interval.signals(model, selCmpts['five']);
+ expect(fiveSg).toContainEqual({
+ name: 'five_tuple',
+ init: '{unit: "", fields: five_tuple_fields, values: [[50, 60], [23, 54]]}',
+ on: [
+ {
+ events: [{signal: 'five_Horsepower'}, {signal: 'five_Miles_per_Gallon'}],
+ update:
+ 'five_Horsepower && five_Miles_per_Gallon ? {unit: "", fields: five_tuple_fields, values: [five_Horsepower,five_Miles_per_Gallon]} : null'
}
]
});
@@ -249,30 +441,15 @@ describe('Interval Selections', () => {
expect.arrayContaining([
{
name: 'one_modify',
- on: [
- {
- events: {signal: 'one_tuple'},
- update: `modify(\"one_store\", ${oneExpr})`
- }
- ]
+ update: `modify(\"one_store\", ${oneExpr})`
},
{
name: 'two_modify',
- on: [
- {
- events: {signal: 'two_tuple'},
- update: `modify(\"two_store\", ${twoExpr})`
- }
- ]
+ update: `modify(\"two_store\", ${twoExpr})`
},
{
name: 'thr_ee_modify',
- on: [
- {
- events: {signal: 'thr_ee_tuple'},
- update: `modify(\"thr_ee_store\", ${threeExpr})`
- }
- ]
+ update: `modify(\"thr_ee_store\", ${threeExpr})`
}
])
);
diff --git a/test/compile/selection/multi.test.ts b/test/compile/selection/multi.test.ts
index c9692865ec..a830cc0a8e 100644
--- a/test/compile/selection/multi.test.ts
+++ b/test/compile/selection/multi.test.ts
@@ -21,6 +21,30 @@ describe('Multi Selection', () => {
on: 'mouseover',
toggle: 'event.ctrlKey',
encodings: ['y', 'color']
+ },
+ 'thr-ee': {
+ type: 'multi',
+ fields: ['Horsepower'],
+ init: {Horsepower: 50}
+ },
+ four: {
+ type: 'multi',
+ encodings: ['x', 'color'],
+ init: {Horsepower: 50, color: 'Japan'}
+ },
+ five: {
+ type: 'multi',
+ fields: ['Year', 'Origin'],
+ init: [
+ {
+ Origin: 'Japan',
+ Year: {year: 1970, month: 1, day: 1}
+ },
+ {
+ Origin: 'USA',
+ Year: {year: 1980, month: 1, day: 1}
+ }
+ ]
}
}));
@@ -29,7 +53,6 @@ describe('Multi Selection', () => {
expect(oneSg).toEqual([
{
name: 'one_tuple',
- value: {},
on: [
{
events: selCmpts['one'].events,
@@ -45,7 +68,6 @@ describe('Multi Selection', () => {
expect(twoSg).toEqual([
{
name: 'two_tuple',
- value: {},
on: [
{
events: selCmpts['two'].events,
@@ -57,13 +79,77 @@ describe('Multi Selection', () => {
}
]);
+ const threeSg = multi.signals(model, selCmpts['thr_ee']);
+ expect(threeSg).toEqual([
+ {
+ name: 'thr_ee_tuple',
+ on: [
+ {
+ events: [{source: 'scope', type: 'click'}],
+ update:
+ 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: thr_ee_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["Horsepower"]]} : null',
+ force: true
+ }
+ ]
+ },
+ {
+ name: 'thr_ee_init',
+ init: 'modify("thr_ee_store", [{unit: "", fields: thr_ee_tuple_fields, values: [50]}])'
+ }
+ ]);
+
+ const fourSg = multi.signals(model, selCmpts['four']);
+ expect(fourSg).toEqual([
+ {
+ name: 'four_tuple',
+ on: [
+ {
+ events: [{source: 'scope', type: 'click'}],
+ update:
+ 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: four_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["Horsepower"], (item().isVoronoi ? datum.datum : datum)["Origin"]]} : null',
+ force: true
+ }
+ ]
+ },
+ {
+ name: 'four_init',
+ init: 'modify("four_store", [{unit: "", fields: four_tuple_fields, values: [50, "Japan"]}])'
+ }
+ ]);
+
+ const fiveSg = multi.signals(model, selCmpts['five']);
+ expect(fiveSg).toEqual([
+ {
+ name: 'five_tuple',
+ on: [
+ {
+ events: [{source: 'scope', type: 'click'}],
+ update:
+ 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: five_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["Year"], (item().isVoronoi ? datum.datum : datum)["Origin"]]} : null',
+ force: true
+ }
+ ]
+ },
+ {
+ name: 'five_init',
+ init:
+ 'modify("five_store", [{unit: "", fields: five_tuple_fields, values: [datetime(1970, 1, 1+1, 0, 0, 0, 0), "Japan"]},{unit: "", fields: five_tuple_fields, values: [datetime(1980, 1, 1+1, 0, 0, 0, 0), "USA"]}])'
+ }
+ ]);
+
const signals = selection.assembleUnitSelectionSignals(model, []);
- expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg]));
+ expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg, ...threeSg, ...fourSg, ...fiveSg]));
});
it('builds unit datasets', () => {
const data: any[] = [];
- expect(selection.assembleUnitSelectionData(model, data)).toEqual([{name: 'one_store'}, {name: 'two_store'}]);
+ expect(selection.assembleUnitSelectionData(model, data)).toEqual([
+ {name: 'one_store'},
+ {name: 'two_store'},
+ {name: 'thr_ee_store'},
+ {name: 'four_store'},
+ {name: 'five_store'}
+ ]);
});
it('leaves marks alone', () => {
diff --git a/test/compile/selection/single.test.ts b/test/compile/selection/single.test.ts
index 80a024b535..e4c8f1130f 100644
--- a/test/compile/selection/single.test.ts
+++ b/test/compile/selection/single.test.ts
@@ -23,6 +23,16 @@ describe('Single Selection', () => {
on: 'mouseover',
encodings: ['y', 'color'],
resolve: 'intersect'
+ },
+ 'thr-ee': {
+ type: 'single',
+ fields: ['Horsepower'],
+ init: {Horsepower: 50}
+ },
+ four: {
+ type: 'single',
+ encodings: ['x', 'color'],
+ init: {x: 50, Origin: 'Japan'}
}
}));
@@ -31,7 +41,6 @@ describe('Single Selection', () => {
expect(oneSg).toEqual([
{
name: 'one_tuple',
- value: {},
on: [
{
events: selCmpts['one'].events,
@@ -47,7 +56,6 @@ describe('Single Selection', () => {
expect(twoSg).toEqual([
{
name: 'two_tuple',
- value: {},
on: [
{
events: selCmpts['two'].events,
@@ -59,8 +67,46 @@ describe('Single Selection', () => {
}
]);
+ const threeSg = single.signals(model, selCmpts['thr_ee']);
+ expect(threeSg).toEqual([
+ {
+ name: 'thr_ee_tuple',
+ on: [
+ {
+ events: [{source: 'scope', type: 'click'}],
+ update:
+ 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: thr_ee_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["Horsepower"]]} : null',
+ force: true
+ }
+ ]
+ },
+ {
+ name: 'thr_ee_init',
+ init: 'modify("thr_ee_store", [{unit: "", fields: thr_ee_tuple_fields, values: [50]}])'
+ }
+ ]);
+
+ const fourSg = single.signals(model, selCmpts['four']);
+ expect(fourSg).toEqual([
+ {
+ name: 'four_tuple',
+ on: [
+ {
+ events: [{source: 'scope', type: 'click'}],
+ update:
+ 'datum && item().mark.marktype !== \'group\' ? {unit: "", fields: four_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)["Horsepower"], (item().isVoronoi ? datum.datum : datum)["Origin"]]} : null',
+ force: true
+ }
+ ]
+ },
+ {
+ name: 'four_init',
+ init: 'modify("four_store", [{unit: "", fields: four_tuple_fields, values: [50, "Japan"]}])'
+ }
+ ]);
+
const signals = selection.assembleUnitSelectionSignals(model, []);
- expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg]));
+ expect(signals).toEqual(expect.arrayContaining([...oneSg, ...twoSg, ...threeSg, ...fourSg]));
});
it('builds modify signals', () => {
@@ -75,21 +121,11 @@ describe('Single Selection', () => {
expect.arrayContaining([
{
name: 'one_modify',
- on: [
- {
- events: {signal: 'one_tuple'},
- update: `modify(\"one_store\", ${oneExpr})`
- }
- ]
+ update: `modify(\"one_store\", ${oneExpr})`
},
{
name: 'two_modify',
- on: [
- {
- events: {signal: 'two_tuple'},
- update: `modify(\"two_store\", ${twoExpr})`
- }
- ]
+ update: `modify(\"two_store\", ${twoExpr})`
}
])
);
@@ -118,7 +154,12 @@ describe('Single Selection', () => {
it('builds unit datasets', () => {
const data: any[] = [];
- expect(selection.assembleUnitSelectionData(model, data)).toEqual([{name: 'one_store'}, {name: 'two_store'}]);
+ expect(selection.assembleUnitSelectionData(model, data)).toEqual([
+ {name: 'one_store'},
+ {name: 'two_store'},
+ {name: 'thr_ee_store'},
+ {name: 'four_store'}
+ ]);
});
it('leaves marks alone', () => {
diff --git a/test/compile/selection/toggle.test.ts b/test/compile/selection/toggle.test.ts
index 221991dc06..847e6e2bfc 100644
--- a/test/compile/selection/toggle.test.ts
+++ b/test/compile/selection/toggle.test.ts
@@ -86,21 +86,11 @@ describe('Toggle Selection Transform', () => {
expect.arrayContaining([
{
name: 'one_modify',
- on: [
- {
- events: {signal: 'one_tuple'},
- update: `modify(\"one_store\", ${oneExpr})`
- }
- ]
+ update: `modify(\"one_store\", ${oneExpr})`
},
{
name: 'two_modify',
- on: [
- {
- events: {signal: 'two_tuple'},
- update: `modify(\"two_store\", ${twoExpr})`
- }
- ]
+ update: `modify(\"two_store\", ${twoExpr})`
}
])
);