diff --git a/examples/compiled/airport_connections.vg.json b/examples/compiled/airport_connections.vg.json index e7ebab19a6..d652dddca6 100644 --- a/examples/compiled/airport_connections.vg.json +++ b/examples/compiled/airport_connections.vg.json @@ -144,7 +144,10 @@ {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - {"name": "org_tuple_fields", "value": [{"type": "E", "field": "origin"}]}, + { + "name": "org_tuple_fields", + "value": [{"type": "E", "field": "origin", "index": 0}] + }, { "name": "org_toggle", "value": false, diff --git a/examples/compiled/bar_count_minimap.vg.json b/examples/compiled/bar_count_minimap.vg.json index 117eab5493..b115b02e05 100644 --- a/examples/compiled/bar_count_minimap.vg.json +++ b/examples/compiled/bar_count_minimap.vg.json @@ -219,7 +219,7 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Name", "channel": "y", "type": "E"}] + "value": [{"field": "Name", "channel": "y", "type": "E", "index": 0}] }, { "name": "brush_translate_anchor", diff --git a/examples/compiled/brush_table.vg.json b/examples/compiled/brush_table.vg.json index 5e761e0377..1538dbdce2 100644 --- a/examples/compiled/brush_table.vg.json +++ b/examples/compiled/brush_table.vg.json @@ -236,8 +236,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/circle_bubble_health_income.vg.json b/examples/compiled/circle_bubble_health_income.vg.json index 1ed6e4370b..a59fde759c 100644 --- a/examples/compiled/circle_bubble_health_income.vg.json +++ b/examples/compiled/circle_bubble_health_income.vg.json @@ -69,8 +69,8 @@ { "name": "view_tuple_fields", "value": [ - {"field": "income", "channel": "x", "type": "R"}, - {"field": "health", "channel": "y", "type": "R"} + {"field": "income", "channel": "x", "type": "R", "index": 0}, + {"field": "health", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/concat_bar_layer_circle.vg.json b/examples/compiled/concat_bar_layer_circle.vg.json index e11c81f743..7e1fd26991 100644 --- a/examples/compiled/concat_bar_layer_circle.vg.json +++ b/examples/compiled/concat_bar_layer_circle.vg.json @@ -268,7 +268,9 @@ }, { "name": "pts_tuple_fields", - "value": [{"field": "Major Genre", "channel": "x", "type": "E"}] + "value": [ + {"field": "Major Genre", "channel": "x", "type": "E", "index": 0} + ] }, { "name": "pts_toggle", diff --git a/examples/compiled/concat_hover.vg.json b/examples/compiled/concat_hover.vg.json index cc80790be5..891fdd3530 100644 --- a/examples/compiled/concat_hover.vg.json +++ b/examples/compiled/concat_hover.vg.json @@ -5,7 +5,10 @@ "padding": 5, "height": 200, "data": [ - {"name": "hover_store"}, + { + "name": "hover_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -65,7 +68,7 @@ "on": [ { "events": [{"source": "scope", "type": "mouseover"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_0\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_0\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, { @@ -74,10 +77,6 @@ } ] }, - { - "name": "hover_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "hover_toggle", "value": false, @@ -115,7 +114,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "length(data(\"hover_store\")) && vlSelectionTest(\"hover_store\", datum)", + "test": "length(data(\"hover_store\")) && vlSelectionIdTest(\"hover_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -197,7 +196,7 @@ "on": [ { "events": [{"source": "scope", "type": "mouseover"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, { @@ -206,10 +205,6 @@ } ] }, - { - "name": "hover_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "hover_toggle", "value": false, @@ -247,7 +242,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "length(data(\"hover_store\")) && vlSelectionTest(\"hover_store\", datum)", + "test": "length(data(\"hover_store\")) && vlSelectionIdTest(\"hover_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/concat_hover_filter.vg.json b/examples/compiled/concat_hover_filter.vg.json index a3991765ab..1407fe2aab 100644 --- a/examples/compiled/concat_hover_filter.vg.json +++ b/examples/compiled/concat_hover_filter.vg.json @@ -5,7 +5,10 @@ "padding": 5, "height": 200, "data": [ - {"name": "hover_store"}, + { + "name": "hover_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -28,7 +31,7 @@ "transform": [ { "type": "filter", - "expr": "length(data(\"hover_store\")) && vlSelectionTest(\"hover_store\", datum)" + "expr": "length(data(\"hover_store\")) && vlSelectionIdTest(\"hover_store\", datum)" } ] }, @@ -95,7 +98,7 @@ "on": [ { "events": [{"source": "scope", "type": "mouseover"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_0_layer_0\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_0_layer_0\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, { @@ -104,10 +107,6 @@ } ] }, - { - "name": "hover_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "hover_toggle", "value": false, @@ -240,7 +239,7 @@ "on": [ { "events": [{"source": "scope", "type": "mouseover"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1_layer_0\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1_layer_0\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, { @@ -249,10 +248,6 @@ } ] }, - { - "name": "hover_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "hover_toggle", "value": false, diff --git a/examples/compiled/interactive_area_brush.vg.json b/examples/compiled/interactive_area_brush.vg.json index 49c36df21f..c8476d1d13 100644 --- a/examples/compiled/interactive_area_brush.vg.json +++ b/examples/compiled/interactive_area_brush.vg.json @@ -143,7 +143,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "yearmonth_date", "channel": "x", "type": "R"}] + "value": [ + {"field": "yearmonth_date", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", diff --git a/examples/compiled/interactive_bar_select_highlight.vg.json b/examples/compiled/interactive_bar_select_highlight.vg.json index 341082f21d..ce0b0aa647 100644 --- a/examples/compiled/interactive_bar_select_highlight.vg.json +++ b/examples/compiled/interactive_bar_select_highlight.vg.json @@ -6,8 +6,14 @@ "height": 200, "style": "cell", "data": [ - {"name": "highlight_store"}, - {"name": "select_store"}, + { + "name": "highlight_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, + { + "name": "select_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "values": [ @@ -68,16 +74,12 @@ "on": [ { "events": [{"source": "scope", "type": "mouseover"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: highlight_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "highlight_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "highlight_toggle", "value": false, @@ -103,16 +105,12 @@ "on": [ { "events": [{"source": "scope", "type": "click"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: select_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "select_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "select_toggle", "value": false, @@ -148,18 +146,18 @@ "cursor": {"value": "pointer"}, "fillOpacity": [ { - "test": "!length(data(\"select_store\")) || vlSelectionTest(\"select_store\", datum)", + "test": "!length(data(\"select_store\")) || vlSelectionIdTest(\"select_store\", datum)", "value": 1 }, {"value": 0.3} ], "strokeWidth": [ { - "test": "length(data(\"select_store\")) && vlSelectionTest(\"select_store\", datum)", + "test": "length(data(\"select_store\")) && vlSelectionIdTest(\"select_store\", datum)", "value": 2 }, { - "test": "length(data(\"highlight_store\")) && vlSelectionTest(\"highlight_store\", datum)", + "test": "length(data(\"highlight_store\")) && vlSelectionIdTest(\"highlight_store\", datum)", "value": 1 }, {"value": 0} diff --git a/examples/compiled/interactive_bin_extent.vg.json b/examples/compiled/interactive_bin_extent.vg.json index 05993dbd67..c3d67fc7ff 100644 --- a/examples/compiled/interactive_bin_extent.vg.json +++ b/examples/compiled/interactive_bin_extent.vg.json @@ -194,7 +194,7 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "time", "channel": "x", "type": "R"}] + "value": [{"field": "time", "channel": "x", "type": "R", "index": 0}] }, { "name": "brush_translate_anchor", diff --git a/examples/compiled/interactive_bin_extent_bottom.vg.json b/examples/compiled/interactive_bin_extent_bottom.vg.json index 6995762631..8534b83a35 100644 --- a/examples/compiled/interactive_bin_extent_bottom.vg.json +++ b/examples/compiled/interactive_bin_extent_bottom.vg.json @@ -271,7 +271,7 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "time", "channel": "x", "type": "R"}] + "value": [{"field": "time", "channel": "x", "type": "R", "index": 0}] }, { "name": "brush_translate_anchor", diff --git a/examples/compiled/interactive_brush.vg.json b/examples/compiled/interactive_brush.vg.json index 14ada8c39e..546613c6cd 100644 --- a/examples/compiled/interactive_brush.vg.json +++ b/examples/compiled/interactive_brush.vg.json @@ -13,8 +13,13 @@ { "unit": "", "fields": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ], "values": [[55, 160], [13, 37]] } @@ -187,8 +192,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/interactive_concat_layer.vg.json b/examples/compiled/interactive_concat_layer.vg.json index 4b26fb4b59..256edb909e 100644 --- a/examples/compiled/interactive_concat_layer.vg.json +++ b/examples/compiled/interactive_concat_layer.vg.json @@ -270,7 +270,9 @@ }, { "name": "pts_tuple_fields", - "value": [{"field": "Major Genre", "channel": "x", "type": "E"}] + "value": [ + {"field": "Major Genre", "channel": "x", "type": "E", "index": 0} + ] }, { "name": "pts_toggle", diff --git a/examples/compiled/interactive_dashboard_europe_pop.vg.json b/examples/compiled/interactive_dashboard_europe_pop.vg.json index 905b49d135..fddb3df7dc 100644 --- a/examples/compiled/interactive_dashboard_europe_pop.vg.json +++ b/examples/compiled/interactive_dashboard_europe_pop.vg.json @@ -471,7 +471,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Country", "channel": "y", "type": "E"}] + "value": [ + {"field": "Country", "channel": "y", "type": "E", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -795,7 +797,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Country", "channel": "y", "type": "E"}] + "value": [ + {"field": "Country", "channel": "y", "type": "E", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -1189,12 +1193,14 @@ { "field": "Population_ages_65_and_above_of_total", "channel": "x", - "type": "R" + "type": "R", + "index": 0 }, { "field": "Population_ages_15_64_of_total", "channel": "y", - "type": "R" + "type": "R", + "index": 1 } ] }, diff --git a/examples/compiled/interactive_global_development.vg.json b/examples/compiled/interactive_global_development.vg.json index eaa4821ab8..7ecf004e61 100644 --- a/examples/compiled/interactive_global_development.vg.json +++ b/examples/compiled/interactive_global_development.vg.json @@ -12,7 +12,7 @@ "values": [ { "unit": "layer_1_layer_1", - "fields": [{"type": "E", "field": "year"}], + "fields": [{"type": "E", "field": "year", "index": 0}], "values": [1955] } ] @@ -141,7 +141,10 @@ "name": "year_tuple", "update": "year_year !== null ? {fields: year_tuple_fields, values: [year_year]} : null" }, - {"name": "year_tuple_fields", "value": [{"type": "E", "field": "year"}]}, + { + "name": "year_tuple_fields", + "value": [{"type": "E", "field": "year", "index": 0}] + }, { "name": "year_modify", "on": [ @@ -164,7 +167,7 @@ }, { "name": "hovered_tuple_fields", - "value": [{"type": "E", "field": "country"}] + "value": [{"type": "E", "field": "country", "index": 0}] }, { "name": "hovered_modify", @@ -188,7 +191,7 @@ }, { "name": "clicked_tuple_fields", - "value": [{"type": "E", "field": "country"}] + "value": [{"type": "E", "field": "country", "index": 0}] }, { "name": "clicked_toggle", diff --git a/examples/compiled/interactive_index_chart.vg.json b/examples/compiled/interactive_index_chart.vg.json index 94b5914f0d..cd63190e9a 100644 --- a/examples/compiled/interactive_index_chart.vg.json +++ b/examples/compiled/interactive_index_chart.vg.json @@ -11,7 +11,9 @@ "values": [ { "unit": "layer_0", - "fields": [{"field": "date", "channel": "x", "type": "E"}], + "fields": [ + {"field": "date", "channel": "x", "type": "E", "index": 0} + ], "values": [1104566400000] } ] @@ -127,7 +129,7 @@ }, { "name": "index_tuple_fields", - "value": [{"field": "date", "channel": "x", "type": "E"}] + "value": [{"field": "date", "channel": "x", "type": "E", "index": 0}] }, { "name": "index_toggle", diff --git a/examples/compiled/interactive_layered_crossfilter.vg.json b/examples/compiled/interactive_layered_crossfilter.vg.json index 2d7da1cf38..8065df4642 100644 --- a/examples/compiled/interactive_layered_crossfilter.vg.json +++ b/examples/compiled/interactive_layered_crossfilter.vg.json @@ -288,7 +288,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "distance", "channel": "x", "type": "R"}] + "value": [ + {"field": "distance", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -639,7 +641,7 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "delay", "channel": "x", "type": "R"}] + "value": [{"field": "delay", "channel": "x", "type": "R", "index": 0}] }, { "name": "brush_translate_anchor", @@ -990,7 +992,7 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "time", "channel": "x", "type": "R"}] + "value": [{"field": "time", "channel": "x", "type": "R", "index": 0}] }, { "name": "brush_translate_anchor", diff --git a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json index b495da99b3..718b6e7327 100644 --- a/examples/compiled/interactive_layered_crossfilter_discrete.vg.json +++ b/examples/compiled/interactive_layered_crossfilter_discrete.vg.json @@ -224,7 +224,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "distance", "channel": "x", "type": "R-RE"}] + "value": [ + {"field": "distance", "channel": "x", "type": "R-RE", "index": 0} + ] }, { "name": "brush_toggle", @@ -369,7 +371,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "delay", "channel": "x", "type": "R-RE"}] + "value": [ + {"field": "delay", "channel": "x", "type": "R-RE", "index": 0} + ] }, { "name": "brush_toggle", @@ -514,7 +518,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "time", "channel": "x", "type": "R-RE"}] + "value": [ + {"field": "time", "channel": "x", "type": "R-RE", "index": 0} + ] }, { "name": "brush_toggle", diff --git a/examples/compiled/interactive_legend.vg.json b/examples/compiled/interactive_legend.vg.json index 5e1c0ccd2e..810cd401b8 100644 --- a/examples/compiled/interactive_legend.vg.json +++ b/examples/compiled/interactive_legend.vg.json @@ -94,7 +94,7 @@ }, { "name": "industry_tuple_fields", - "value": [{"type": "E", "field": "series"}] + "value": [{"type": "E", "field": "series", "index": 0}] }, { "name": "industry_toggle", diff --git a/examples/compiled/interactive_legend_dblclick.vg.json b/examples/compiled/interactive_legend_dblclick.vg.json index f76010964b..057780441b 100644 --- a/examples/compiled/interactive_legend_dblclick.vg.json +++ b/examples/compiled/interactive_legend_dblclick.vg.json @@ -94,7 +94,7 @@ }, { "name": "industry_tuple_fields", - "value": [{"type": "E", "field": "series"}] + "value": [{"type": "E", "field": "series", "index": 0}] }, { "name": "industry_toggle", diff --git a/examples/compiled/interactive_line_brush_cursor.vg.json b/examples/compiled/interactive_line_brush_cursor.vg.json index d49201148c..ab21f06e4e 100644 --- a/examples/compiled/interactive_line_brush_cursor.vg.json +++ b/examples/compiled/interactive_line_brush_cursor.vg.json @@ -108,7 +108,7 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "date", "channel": "x", "type": "R"}] + "value": [{"field": "date", "channel": "x", "type": "R", "index": 0}] }, { "name": "brush_translate_anchor", diff --git a/examples/compiled/interactive_line_hover.vg.json b/examples/compiled/interactive_line_hover.vg.json index 3639c09689..a3cca6bc8b 100644 --- a/examples/compiled/interactive_line_hover.vg.json +++ b/examples/compiled/interactive_line_hover.vg.json @@ -12,7 +12,7 @@ "values": [ { "unit": "layer_0", - "fields": [{"type": "E", "field": "symbol"}], + "fields": [{"type": "E", "field": "symbol", "index": 0}], "values": ["AAPL"] } ] @@ -64,7 +64,10 @@ {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - {"name": "hover_tuple_fields", "value": [{"type": "E", "field": "symbol"}]}, + { + "name": "hover_tuple_fields", + "value": [{"type": "E", "field": "symbol", "index": 0}] + }, { "name": "hover_toggle", "value": false, diff --git a/examples/compiled/interactive_multi_line_label.vg.json b/examples/compiled/interactive_multi_line_label.vg.json index 88833d3a0b..cfbcb1e231 100644 --- a/examples/compiled/interactive_multi_line_label.vg.json +++ b/examples/compiled/interactive_multi_line_label.vg.json @@ -91,7 +91,7 @@ }, { "name": "label_tuple_fields", - "value": [{"field": "date", "channel": "x", "type": "E"}] + "value": [{"field": "date", "channel": "x", "type": "E", "index": 0}] }, { "name": "label_toggle", diff --git a/examples/compiled/interactive_multi_line_pivot_tooltip.vg.json b/examples/compiled/interactive_multi_line_pivot_tooltip.vg.json index 9303d37d68..c8e17ff445 100644 --- a/examples/compiled/interactive_multi_line_pivot_tooltip.vg.json +++ b/examples/compiled/interactive_multi_line_pivot_tooltip.vg.json @@ -73,7 +73,10 @@ {"events": [{"source": "view", "type": "mouseout"}], "update": "null"} ] }, - {"name": "hover_tuple_fields", "value": [{"type": "E", "field": "date"}]}, + { + "name": "hover_tuple_fields", + "value": [{"type": "E", "field": "date", "index": 0}] + }, { "name": "hover_toggle", "value": false, diff --git a/examples/compiled/interactive_multi_line_tooltip.vg.json b/examples/compiled/interactive_multi_line_tooltip.vg.json index f7bc24edf2..fbd9e7b8b5 100644 --- a/examples/compiled/interactive_multi_line_tooltip.vg.json +++ b/examples/compiled/interactive_multi_line_tooltip.vg.json @@ -6,7 +6,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "hover_store"}, + { + "name": "hover_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/seattle-weather.csv", @@ -49,16 +52,12 @@ "on": [ { "events": [{"source": "scope", "type": "mouseover"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"layer_2\", fields: hover_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"layer_2\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "hover_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "hover_toggle", "value": false, @@ -139,7 +138,7 @@ "update": { "stroke": [ { - "test": "length(data(\"hover_store\")) && vlSelectionTest(\"hover_store\", datum)", + "test": "length(data(\"hover_store\")) && vlSelectionIdTest(\"hover_store\", datum)", "value": "black" }, {"value": "transparent"} diff --git a/examples/compiled/interactive_overview_detail.vg.json b/examples/compiled/interactive_overview_detail.vg.json index e429262af7..7e80765bd9 100644 --- a/examples/compiled/interactive_overview_detail.vg.json +++ b/examples/compiled/interactive_overview_detail.vg.json @@ -248,7 +248,7 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "date", "channel": "x", "type": "R"}] + "value": [{"field": "date", "channel": "x", "type": "R", "index": 0}] }, { "name": "brush_translate_anchor", diff --git a/examples/compiled/interactive_paintbrush.vg.json b/examples/compiled/interactive_paintbrush.vg.json index d66ffbba69..f1d71d5cdb 100644 --- a/examples/compiled/interactive_paintbrush.vg.json +++ b/examples/compiled/interactive_paintbrush.vg.json @@ -7,7 +7,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "paintbrush_store"}, + { + "name": "paintbrush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -40,16 +43,12 @@ "events": [ {"source": "scope", "type": "mouseover", "markname": "voronoi"} ], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "paintbrush_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "paintbrush_toggle", "value": false, @@ -93,7 +92,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionIdTest(\"paintbrush_store\", datum)", "value": 300 }, {"value": 50} diff --git a/examples/compiled/interactive_paintbrush_color.vg.json b/examples/compiled/interactive_paintbrush_color.vg.json index 913a4f1e07..c8eea9f2d7 100644 --- a/examples/compiled/interactive_paintbrush_color.vg.json +++ b/examples/compiled/interactive_paintbrush_color.vg.json @@ -7,7 +7,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "paintbrush_store"}, + { + "name": "paintbrush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -38,16 +41,12 @@ "on": [ { "events": [{"source": "scope", "type": "mouseover"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "paintbrush_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "paintbrush_toggle", "value": false, @@ -81,7 +80,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionIdTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/interactive_paintbrush_color_nearest.vg.json b/examples/compiled/interactive_paintbrush_color_nearest.vg.json index db0b103e36..02c98ed76e 100644 --- a/examples/compiled/interactive_paintbrush_color_nearest.vg.json +++ b/examples/compiled/interactive_paintbrush_color_nearest.vg.json @@ -7,7 +7,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "paintbrush_store"}, + { + "name": "paintbrush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -40,16 +43,12 @@ "events": [ {"source": "scope", "type": "mouseover", "markname": "voronoi"} ], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "paintbrush_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "paintbrush_toggle", "value": false, @@ -85,7 +84,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionIdTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/interactive_paintbrush_interval.vg.json b/examples/compiled/interactive_paintbrush_interval.vg.json index a7bc7dbf2a..76396388f0 100644 --- a/examples/compiled/interactive_paintbrush_interval.vg.json +++ b/examples/compiled/interactive_paintbrush_interval.vg.json @@ -174,8 +174,8 @@ { "name": "paintbrush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/interactive_paintbrush_simple_false.vg.json b/examples/compiled/interactive_paintbrush_simple_false.vg.json index 7a89c340b8..1ff770e220 100644 --- a/examples/compiled/interactive_paintbrush_simple_false.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_false.vg.json @@ -6,7 +6,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "paintbrush_store"}, + { + "name": "paintbrush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -38,16 +41,12 @@ "on": [ { "events": [{"source": "scope", "type": "mouseover"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "paintbrush_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "paintbrush_toggle", "value": false, @@ -92,7 +91,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "length(data(\"paintbrush_store\")) && vlSelectionTest(\"paintbrush_store\", datum)", + "test": "length(data(\"paintbrush_store\")) && vlSelectionIdTest(\"paintbrush_store\", datum)", "value": 300 }, {"value": 50} diff --git a/examples/compiled/interactive_paintbrush_simple_true.vg.json b/examples/compiled/interactive_paintbrush_simple_true.vg.json index f039fd7d29..6456a391a3 100644 --- a/examples/compiled/interactive_paintbrush_simple_true.vg.json +++ b/examples/compiled/interactive_paintbrush_simple_true.vg.json @@ -6,7 +6,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "paintbrush_store"}, + { + "name": "paintbrush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -38,16 +41,12 @@ "on": [ { "events": [{"source": "scope", "type": "mouseover"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "paintbrush_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "paintbrush_toggle", "value": false, @@ -92,7 +91,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionIdTest(\"paintbrush_store\", datum)", "value": 300 }, {"value": 50} diff --git a/examples/compiled/interactive_panzoom_splom.vg.json b/examples/compiled/interactive_panzoom_splom.vg.json index b4d3aaaa81..4183d65cff 100644 --- a/examples/compiled/interactive_panzoom_splom.vg.json +++ b/examples/compiled/interactive_panzoom_splom.vg.json @@ -177,8 +177,13 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -379,8 +384,8 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -562,7 +567,9 @@ }, { "name": "grid_tuple_fields", - "value": [{"field": "Horsepower", "channel": "x", "type": "R"}] + "value": [ + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "grid_translate_anchor", @@ -764,8 +771,13 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -947,7 +959,9 @@ }, { "name": "grid_tuple_fields", - "value": [{"field": "Acceleration", "channel": "x", "type": "R"}] + "value": [ + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "grid_translate_anchor", @@ -1147,8 +1161,8 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -1330,7 +1344,14 @@ }, { "name": "grid_tuple_fields", - "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}] + "value": [ + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + } + ] }, { "name": "grid_translate_anchor", @@ -1532,8 +1553,13 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { @@ -1736,8 +1762,13 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json index 1b0b71ce9e..07f6c9d60a 100644 --- a/examples/compiled/interactive_panzoom_vconcat_shared.vg.json +++ b/examples/compiled/interactive_panzoom_vconcat_shared.vg.json @@ -106,8 +106,13 @@ { "name": "region_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/interactive_point_init.vg.json b/examples/compiled/interactive_point_init.vg.json index 9a8f1b4b4e..f4b3baa254 100644 --- a/examples/compiled/interactive_point_init.vg.json +++ b/examples/compiled/interactive_point_init.vg.json @@ -12,16 +12,16 @@ { "unit": "", "fields": [ - {"type": "E", "field": "Cylinders"}, - {"type": "E", "field": "Year"} + {"type": "E", "field": "Cylinders", "index": 0}, + {"type": "E", "field": "Year", "index": 1} ], "values": [4, 1981] }, { "unit": "", "fields": [ - {"type": "E", "field": "Cylinders"}, - {"type": "E", "field": "Year"} + {"type": "E", "field": "Cylinders", "index": 0}, + {"type": "E", "field": "Year", "index": 1} ], "values": [8, 1972] } @@ -66,8 +66,8 @@ { "name": "CylYr_tuple_fields", "value": [ - {"type": "E", "field": "Cylinders"}, - {"type": "E", "field": "Year"} + {"type": "E", "field": "Cylinders", "index": 0}, + {"type": "E", "field": "Year", "index": 1} ] }, { diff --git a/examples/compiled/interactive_query_widgets.vg.json b/examples/compiled/interactive_query_widgets.vg.json index 545c77863f..26c05a8494 100644 --- a/examples/compiled/interactive_query_widgets.vg.json +++ b/examples/compiled/interactive_query_widgets.vg.json @@ -13,8 +13,8 @@ { "unit": "layer_0", "fields": [ - {"type": "E", "field": "Cylinders"}, - {"type": "E", "field": "Year"} + {"type": "E", "field": "Cylinders", "index": 0}, + {"type": "E", "field": "Year", "index": 1} ], "values": [4, 1977] } @@ -82,8 +82,8 @@ { "name": "CylYr_tuple_fields", "value": [ - {"type": "E", "field": "Cylinders"}, - {"type": "E", "field": "Year"} + {"type": "E", "field": "Cylinders", "index": 0}, + {"type": "E", "field": "Year", "index": 1} ] }, { diff --git a/examples/compiled/interactive_seattle_weather.vg.json b/examples/compiled/interactive_seattle_weather.vg.json index a8684b0914..b7761ca2c9 100644 --- a/examples/compiled/interactive_seattle_weather.vg.json +++ b/examples/compiled/interactive_seattle_weather.vg.json @@ -172,7 +172,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "monthdate_date", "channel": "x", "type": "R"}] + "value": [ + {"field": "monthdate_date", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -448,7 +450,9 @@ }, { "name": "click_tuple_fields", - "value": [{"field": "weather", "channel": "color", "type": "E"}] + "value": [ + {"field": "weather", "channel": "color", "type": "E", "index": 0} + ] }, { "name": "click_toggle", diff --git a/examples/compiled/interactive_splom.vg.json b/examples/compiled/interactive_splom.vg.json index 977b8fa8e7..2b71d089be 100644 --- a/examples/compiled/interactive_splom.vg.json +++ b/examples/compiled/interactive_splom.vg.json @@ -281,8 +281,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -421,8 +426,13 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -791,8 +801,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -929,8 +939,8 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -1234,7 +1244,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Horsepower", "channel": "x", "type": "R"}] + "value": [ + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -1351,7 +1363,9 @@ }, { "name": "grid_tuple_fields", - "value": [{"field": "Horsepower", "channel": "x", "type": "R"}] + "value": [ + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "grid_translate_anchor", @@ -1718,8 +1732,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -1858,8 +1877,13 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -2165,7 +2189,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Acceleration", "channel": "x", "type": "R"}] + "value": [ + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -2282,7 +2308,9 @@ }, { "name": "grid_tuple_fields", - "value": [{"field": "Acceleration", "channel": "x", "type": "R"}] + "value": [ + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "grid_translate_anchor", @@ -2647,8 +2675,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -2785,8 +2813,8 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -3094,7 +3122,14 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}] + "value": [ + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + } + ] }, { "name": "brush_translate_anchor", @@ -3211,7 +3246,14 @@ }, { "name": "grid_tuple_fields", - "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}] + "value": [ + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + } + ] }, { "name": "grid_translate_anchor", @@ -3578,8 +3620,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { @@ -3718,8 +3765,13 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { @@ -4090,8 +4142,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { @@ -4230,8 +4287,13 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/interactive_stocks_nearest_index.vg.json b/examples/compiled/interactive_stocks_nearest_index.vg.json index d2e215a442..a8f4da0c99 100644 --- a/examples/compiled/interactive_stocks_nearest_index.vg.json +++ b/examples/compiled/interactive_stocks_nearest_index.vg.json @@ -68,7 +68,7 @@ }, { "name": "index_tuple_fields", - "value": [{"field": "date", "channel": "x", "type": "E"}] + "value": [{"field": "date", "channel": "x", "type": "E", "index": 0}] }, { "name": "index_toggle", diff --git a/examples/compiled/isotype_grid.vg.json b/examples/compiled/isotype_grid.vg.json index cfd0b76d02..c155427082 100644 --- a/examples/compiled/isotype_grid.vg.json +++ b/examples/compiled/isotype_grid.vg.json @@ -267,8 +267,8 @@ { "name": "highlight_tuple_fields", "value": [ - {"field": "col", "channel": "x", "type": "E"}, - {"field": "row", "channel": "y", "type": "E"} + {"field": "col", "channel": "x", "type": "E", "index": 0}, + {"field": "row", "channel": "y", "type": "E", "index": 1} ] }, { diff --git a/examples/compiled/param_expr.vg.json b/examples/compiled/param_expr.vg.json index ca0bd9994e..1f1370675e 100644 --- a/examples/compiled/param_expr.vg.json +++ b/examples/compiled/param_expr.vg.json @@ -49,7 +49,7 @@ }, { "name": "sel_tuple_fields", - "value": [{"type": "E", "field": "Miles_per_Gallon"}] + "value": [{"type": "E", "field": "Miles_per_Gallon", "index": 0}] }, { "name": "sel_modify", diff --git a/examples/compiled/selection_bind_cylyr.vg.json b/examples/compiled/selection_bind_cylyr.vg.json index c4ef29ebb6..fa30918965 100644 --- a/examples/compiled/selection_bind_cylyr.vg.json +++ b/examples/compiled/selection_bind_cylyr.vg.json @@ -49,8 +49,8 @@ { "name": "CylYr_tuple_fields", "value": [ - {"type": "E", "field": "Cylinders"}, - {"type": "E", "field": "Year"} + {"type": "E", "field": "Cylinders", "index": 0}, + {"type": "E", "field": "Year", "index": 1} ] }, { diff --git a/examples/compiled/selection_bind_origin.vg.json b/examples/compiled/selection_bind_origin.vg.json index 8b6c71f01f..0872504875 100644 --- a/examples/compiled/selection_bind_origin.vg.json +++ b/examples/compiled/selection_bind_origin.vg.json @@ -40,7 +40,10 @@ "name": "org_tuple", "update": "org_Origin !== null ? {fields: org_tuple_fields, values: [org_Origin]} : null" }, - {"name": "org_tuple_fields", "value": [{"type": "E", "field": "Origin"}]}, + { + "name": "org_tuple_fields", + "value": [{"type": "E", "field": "Origin", "index": 0}] + }, { "name": "org_modify", "on": [ diff --git a/examples/compiled/selection_brush_timeunit.vg.json b/examples/compiled/selection_brush_timeunit.vg.json index f18b6c35b9..f862206661 100644 --- a/examples/compiled/selection_brush_timeunit.vg.json +++ b/examples/compiled/selection_brush_timeunit.vg.json @@ -166,7 +166,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "seconds_date", "channel": "x", "type": "R"}] + "value": [ + {"field": "seconds_date", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", diff --git a/examples/compiled/selection_clear_brush.vg.json b/examples/compiled/selection_clear_brush.vg.json index b42df697ed..66b88bd753 100644 --- a/examples/compiled/selection_clear_brush.vg.json +++ b/examples/compiled/selection_clear_brush.vg.json @@ -12,8 +12,13 @@ { "unit": "", "fields": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ], "values": [[55, 160], [13, 37]] } @@ -180,8 +185,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/selection_composition_and.vg.json b/examples/compiled/selection_composition_and.vg.json index c67bcf6799..69509cf21e 100644 --- a/examples/compiled/selection_composition_and.vg.json +++ b/examples/compiled/selection_composition_and.vg.json @@ -177,8 +177,8 @@ { "name": "alex_tuple_fields", "value": [ - {"field": "Cylinders", "channel": "x", "type": "E"}, - {"field": "Origin", "channel": "y", "type": "E"} + {"field": "Cylinders", "channel": "x", "type": "E", "index": 0}, + {"field": "Origin", "channel": "y", "type": "E", "index": 1} ] }, { @@ -400,8 +400,8 @@ { "name": "morgan_tuple_fields", "value": [ - {"field": "Cylinders", "channel": "x", "type": "E"}, - {"field": "Origin", "channel": "y", "type": "E"} + {"field": "Cylinders", "channel": "x", "type": "E", "index": 0}, + {"field": "Origin", "channel": "y", "type": "E", "index": 1} ] }, { diff --git a/examples/compiled/selection_composition_or.vg.json b/examples/compiled/selection_composition_or.vg.json index 1629968999..f00d128433 100644 --- a/examples/compiled/selection_composition_or.vg.json +++ b/examples/compiled/selection_composition_or.vg.json @@ -177,8 +177,8 @@ { "name": "alex_tuple_fields", "value": [ - {"field": "Cylinders", "channel": "x", "type": "E"}, - {"field": "Origin", "channel": "y", "type": "E"} + {"field": "Cylinders", "channel": "x", "type": "E", "index": 0}, + {"field": "Origin", "channel": "y", "type": "E", "index": 1} ] }, { @@ -400,8 +400,8 @@ { "name": "morgan_tuple_fields", "value": [ - {"field": "Cylinders", "channel": "x", "type": "E"}, - {"field": "Origin", "channel": "y", "type": "E"} + {"field": "Cylinders", "channel": "x", "type": "E", "index": 0}, + {"field": "Origin", "channel": "y", "type": "E", "index": 1} ] }, { diff --git a/examples/compiled/selection_concat.vg.json b/examples/compiled/selection_concat.vg.json index 3201351e9b..d5c0552124 100644 --- a/examples/compiled/selection_concat.vg.json +++ b/examples/compiled/selection_concat.vg.json @@ -203,8 +203,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -507,8 +512,8 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Displacement", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + {"field": "Displacement", "channel": "x", "type": "R", "index": 0}, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/selection_filter.vg.json b/examples/compiled/selection_filter.vg.json index 73c168c3cd..a25da1b874 100644 --- a/examples/compiled/selection_filter.vg.json +++ b/examples/compiled/selection_filter.vg.json @@ -200,8 +200,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/selection_filter_composition.vg.json b/examples/compiled/selection_filter_composition.vg.json index cdffdfbf11..2a6790911c 100644 --- a/examples/compiled/selection_filter_composition.vg.json +++ b/examples/compiled/selection_filter_composition.vg.json @@ -200,8 +200,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/selection_filter_false.vg.json b/examples/compiled/selection_filter_false.vg.json index 9609103d4a..a21f86434d 100644 --- a/examples/compiled/selection_filter_false.vg.json +++ b/examples/compiled/selection_filter_false.vg.json @@ -200,8 +200,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/selection_filter_true.vg.json b/examples/compiled/selection_filter_true.vg.json index 73c168c3cd..a25da1b874 100644 --- a/examples/compiled/selection_filter_true.vg.json +++ b/examples/compiled/selection_filter_true.vg.json @@ -200,8 +200,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/selection_heatmap.vg.json b/examples/compiled/selection_heatmap.vg.json index 6dcbcf9d26..0871bb40c2 100644 --- a/examples/compiled/selection_heatmap.vg.json +++ b/examples/compiled/selection_heatmap.vg.json @@ -4,7 +4,10 @@ "padding": 5, "style": "cell", "data": [ - {"name": "highlight_store"}, + { + "name": "highlight_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "values": [ @@ -55,16 +58,12 @@ "on": [ { "events": [{"source": "scope", "type": "click"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: highlight_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "highlight_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "highlight_toggle", "value": false, @@ -99,21 +98,21 @@ "fill": {"scale": "fill", "field": "count"}, "stroke": [ { - "test": "length(data(\"highlight_store\")) && vlSelectionTest(\"highlight_store\", datum)", + "test": "length(data(\"highlight_store\")) && vlSelectionIdTest(\"highlight_store\", datum)", "value": "black" }, {"value": null} ], "opacity": [ { - "test": "!length(data(\"highlight_store\")) || vlSelectionTest(\"highlight_store\", datum)", + "test": "!length(data(\"highlight_store\")) || vlSelectionIdTest(\"highlight_store\", datum)", "value": 1 }, {"value": 0.5} ], "zindex": [ { - "test": "!length(data(\"highlight_store\")) || vlSelectionTest(\"highlight_store\", datum)", + "test": "!length(data(\"highlight_store\")) || vlSelectionIdTest(\"highlight_store\", datum)", "value": 1 }, {"value": 0} diff --git a/examples/compiled/selection_insert.vg.json b/examples/compiled/selection_insert.vg.json index a8ab7d3ec1..575aaf76e3 100644 --- a/examples/compiled/selection_insert.vg.json +++ b/examples/compiled/selection_insert.vg.json @@ -6,7 +6,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "paintbrush_store"}, + { + "name": "paintbrush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -37,16 +40,12 @@ "on": [ { "events": [{"source": "scope", "type": "click"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "paintbrush_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "paintbrush_modify", "on": [ @@ -69,7 +68,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionIdTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_interval_mark_style.vg.json b/examples/compiled/selection_interval_mark_style.vg.json index 05bfed9cdf..61c88a0746 100644 --- a/examples/compiled/selection_interval_mark_style.vg.json +++ b/examples/compiled/selection_interval_mark_style.vg.json @@ -177,8 +177,8 @@ { "name": "alex_tuple_fields", "value": [ - {"field": "Cylinders", "channel": "x", "type": "E"}, - {"field": "Origin", "channel": "y", "type": "E"} + {"field": "Cylinders", "channel": "x", "type": "E", "index": 0}, + {"field": "Origin", "channel": "y", "type": "E", "index": 1} ] }, { @@ -400,8 +400,8 @@ { "name": "morgan_tuple_fields", "value": [ - {"field": "Cylinders", "channel": "x", "type": "E"}, - {"field": "Origin", "channel": "y", "type": "E"} + {"field": "Cylinders", "channel": "x", "type": "E", "index": 0}, + {"field": "Origin", "channel": "y", "type": "E", "index": 1} ] }, { diff --git a/examples/compiled/selection_layer_bar_month.vg.json b/examples/compiled/selection_layer_bar_month.vg.json index 5e6abd859c..9cd9257625 100644 --- a/examples/compiled/selection_layer_bar_month.vg.json +++ b/examples/compiled/selection_layer_bar_month.vg.json @@ -152,7 +152,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "month_date", "channel": "x", "type": "E"}] + "value": [ + {"field": "month_date", "channel": "x", "type": "E", "index": 0} + ] }, { "name": "brush_translate_anchor", diff --git a/examples/compiled/selection_multi_condition.vg.json b/examples/compiled/selection_multi_condition.vg.json index 7a3315fe41..11be0445fd 100644 --- a/examples/compiled/selection_multi_condition.vg.json +++ b/examples/compiled/selection_multi_condition.vg.json @@ -8,7 +8,10 @@ "style": "cell", "data": [ {"name": "brush_store"}, - {"name": "hoverbrush_store"}, + { + "name": "hoverbrush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -178,8 +181,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { @@ -267,16 +270,12 @@ "events": [ {"source": "scope", "type": "mouseover", "markname": "voronoi"} ], - "update": "datum && item().mark.marktype !== 'group' && indexof(item().mark.name, 'brush_brush') < 0 ? {unit: \"\", fields: hoverbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' && indexof(item().mark.name, 'brush_brush') < 0 ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "hoverbrush_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "hoverbrush_toggle", "value": false, @@ -351,7 +350,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!length(data(\"hoverbrush_store\")) || vlSelectionTest(\"hoverbrush_store\", datum)", + "test": "!length(data(\"hoverbrush_store\")) || vlSelectionIdTest(\"hoverbrush_store\", datum)", "value": "teal" }, { diff --git a/examples/compiled/selection_project_binned_interval.vg.json b/examples/compiled/selection_project_binned_interval.vg.json index 2a5b4d5968..44a7be6552 100644 --- a/examples/compiled/selection_project_binned_interval.vg.json +++ b/examples/compiled/selection_project_binned_interval.vg.json @@ -167,7 +167,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Acceleration", "channel": "x", "type": "R"}] + "value": [ + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", diff --git a/examples/compiled/selection_project_interval.vg.json b/examples/compiled/selection_project_interval.vg.json index 2586350b46..3fb6eb6d08 100644 --- a/examples/compiled/selection_project_interval.vg.json +++ b/examples/compiled/selection_project_interval.vg.json @@ -166,8 +166,8 @@ { "name": "pts_tuple_fields", "value": [ - {"field": "Cylinders", "channel": "x", "type": "E"}, - {"field": "Origin", "channel": "y", "type": "E"} + {"field": "Cylinders", "channel": "x", "type": "E", "index": 0}, + {"field": "Origin", "channel": "y", "type": "E", "index": 1} ] }, { diff --git a/examples/compiled/selection_project_interval_x.vg.json b/examples/compiled/selection_project_interval_x.vg.json index 22020f4c9d..3caafe7c28 100644 --- a/examples/compiled/selection_project_interval_x.vg.json +++ b/examples/compiled/selection_project_interval_x.vg.json @@ -111,7 +111,7 @@ }, { "name": "pts_tuple_fields", - "value": [{"field": "Cylinders", "channel": "x", "type": "E"}] + "value": [{"field": "Cylinders", "channel": "x", "type": "E", "index": 0}] }, { "name": "pts_translate_anchor", diff --git a/examples/compiled/selection_project_interval_x_y.vg.json b/examples/compiled/selection_project_interval_x_y.vg.json index 2586350b46..3fb6eb6d08 100644 --- a/examples/compiled/selection_project_interval_x_y.vg.json +++ b/examples/compiled/selection_project_interval_x_y.vg.json @@ -166,8 +166,8 @@ { "name": "pts_tuple_fields", "value": [ - {"field": "Cylinders", "channel": "x", "type": "E"}, - {"field": "Origin", "channel": "y", "type": "E"} + {"field": "Cylinders", "channel": "x", "type": "E", "index": 0}, + {"field": "Origin", "channel": "y", "type": "E", "index": 1} ] }, { diff --git a/examples/compiled/selection_project_interval_y.vg.json b/examples/compiled/selection_project_interval_y.vg.json index fd238a8b98..81861b9a91 100644 --- a/examples/compiled/selection_project_interval_y.vg.json +++ b/examples/compiled/selection_project_interval_y.vg.json @@ -111,7 +111,7 @@ }, { "name": "pts_tuple_fields", - "value": [{"field": "Origin", "channel": "y", "type": "E"}] + "value": [{"field": "Origin", "channel": "y", "type": "E", "index": 0}] }, { "name": "pts_translate_anchor", diff --git a/examples/compiled/selection_project_multi.vg.json b/examples/compiled/selection_project_multi.vg.json index 4bb92d0210..deda91826c 100644 --- a/examples/compiled/selection_project_multi.vg.json +++ b/examples/compiled/selection_project_multi.vg.json @@ -6,7 +6,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "pts_store"}, + { + "name": "pts_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -37,13 +40,12 @@ "on": [ { "events": [{"source": "scope", "type": "click"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, { "name": "pts_toggle", "value": false, @@ -78,7 +80,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", + "test": "!length(data(\"pts_store\")) || vlSelectionIdTest(\"pts_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -92,7 +94,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "length(data(\"pts_store\")) && vlSelectionTest(\"pts_store\", datum)", + "test": "length(data(\"pts_store\")) && vlSelectionIdTest(\"pts_store\", datum)", "value": 200 }, {"value": 50} diff --git a/examples/compiled/selection_project_multi_cylinders.vg.json b/examples/compiled/selection_project_multi_cylinders.vg.json index 67e9703503..de5aea5200 100644 --- a/examples/compiled/selection_project_multi_cylinders.vg.json +++ b/examples/compiled/selection_project_multi_cylinders.vg.json @@ -44,7 +44,7 @@ }, { "name": "pts_tuple_fields", - "value": [{"type": "E", "field": "Cylinders"}] + "value": [{"type": "E", "field": "Cylinders", "index": 0}] }, { "name": "pts_toggle", diff --git a/examples/compiled/selection_project_multi_cylinders_origin.vg.json b/examples/compiled/selection_project_multi_cylinders_origin.vg.json index 87c82d1174..a55a465bc7 100644 --- a/examples/compiled/selection_project_multi_cylinders_origin.vg.json +++ b/examples/compiled/selection_project_multi_cylinders_origin.vg.json @@ -45,8 +45,8 @@ { "name": "pts_tuple_fields", "value": [ - {"type": "E", "field": "Cylinders"}, - {"type": "E", "field": "Origin"} + {"type": "E", "field": "Cylinders", "index": 0}, + {"type": "E", "field": "Origin", "index": 1} ] }, { diff --git a/examples/compiled/selection_project_multi_origin.vg.json b/examples/compiled/selection_project_multi_origin.vg.json index 979e2de262..67b71eec0a 100644 --- a/examples/compiled/selection_project_multi_origin.vg.json +++ b/examples/compiled/selection_project_multi_origin.vg.json @@ -42,7 +42,10 @@ {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "Origin"}]}, + { + "name": "pts_tuple_fields", + "value": [{"type": "E", "field": "Origin", "index": 0}] + }, { "name": "pts_toggle", "value": false, diff --git a/examples/compiled/selection_project_single.vg.json b/examples/compiled/selection_project_single.vg.json index 5cee51d653..59c8b70347 100644 --- a/examples/compiled/selection_project_single.vg.json +++ b/examples/compiled/selection_project_single.vg.json @@ -6,7 +6,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "pts_store"}, + { + "name": "pts_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -37,13 +40,12 @@ "on": [ { "events": [{"source": "scope", "type": "click"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, { "name": "pts_modify", "on": [ @@ -67,7 +69,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", + "test": "!length(data(\"pts_store\")) || vlSelectionIdTest(\"pts_store\", datum)", "scale": "color", "field": "Cylinders" }, @@ -81,7 +83,7 @@ "y": {"scale": "y", "field": "Miles_per_Gallon"}, "size": [ { - "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", + "test": "!length(data(\"pts_store\")) || vlSelectionIdTest(\"pts_store\", datum)", "value": 200 }, {"value": 50} diff --git a/examples/compiled/selection_project_single_cylinders.vg.json b/examples/compiled/selection_project_single_cylinders.vg.json index 9094df55e4..4b661e34b0 100644 --- a/examples/compiled/selection_project_single_cylinders.vg.json +++ b/examples/compiled/selection_project_single_cylinders.vg.json @@ -44,7 +44,7 @@ }, { "name": "pts_tuple_fields", - "value": [{"type": "E", "field": "Cylinders"}] + "value": [{"type": "E", "field": "Cylinders", "index": 0}] }, { "name": "pts_modify", diff --git a/examples/compiled/selection_project_single_cylinders_origin.vg.json b/examples/compiled/selection_project_single_cylinders_origin.vg.json index 67a3fa6102..e7850dbdf1 100644 --- a/examples/compiled/selection_project_single_cylinders_origin.vg.json +++ b/examples/compiled/selection_project_single_cylinders_origin.vg.json @@ -45,8 +45,8 @@ { "name": "pts_tuple_fields", "value": [ - {"type": "E", "field": "Cylinders"}, - {"type": "E", "field": "Origin"} + {"type": "E", "field": "Cylinders", "index": 0}, + {"type": "E", "field": "Origin", "index": 1} ] }, { diff --git a/examples/compiled/selection_project_single_origin.vg.json b/examples/compiled/selection_project_single_origin.vg.json index 87161fb20d..8153205580 100644 --- a/examples/compiled/selection_project_single_origin.vg.json +++ b/examples/compiled/selection_project_single_origin.vg.json @@ -42,7 +42,10 @@ {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "Origin"}]}, + { + "name": "pts_tuple_fields", + "value": [{"type": "E", "field": "Origin", "index": 0}] + }, { "name": "pts_modify", "on": [ diff --git a/examples/compiled/selection_resolution_global.vg.json b/examples/compiled/selection_resolution_global.vg.json index ca0a20cd5c..fd8411e5e0 100644 --- a/examples/compiled/selection_resolution_global.vg.json +++ b/examples/compiled/selection_resolution_global.vg.json @@ -239,8 +239,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -651,8 +656,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -1000,7 +1005,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Horsepower", "channel": "x", "type": "R"}] + "value": [ + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -1409,8 +1416,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -1760,7 +1772,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Acceleration", "channel": "x", "type": "R"}] + "value": [ + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -2167,8 +2181,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -2520,7 +2534,14 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}] + "value": [ + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + } + ] }, { "name": "brush_translate_anchor", @@ -2929,8 +2950,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { @@ -3343,8 +3369,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/selection_resolution_intersect.vg.json b/examples/compiled/selection_resolution_intersect.vg.json index be6ea11495..9debdab7e2 100644 --- a/examples/compiled/selection_resolution_intersect.vg.json +++ b/examples/compiled/selection_resolution_intersect.vg.json @@ -239,8 +239,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -603,8 +608,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -904,7 +909,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Horsepower", "channel": "x", "type": "R"}] + "value": [ + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -1265,8 +1272,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -1568,7 +1580,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Acceleration", "channel": "x", "type": "R"}] + "value": [ + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -1927,8 +1941,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -2232,7 +2246,14 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}] + "value": [ + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + } + ] }, { "name": "brush_translate_anchor", @@ -2593,8 +2614,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { @@ -2959,8 +2985,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/selection_resolution_union.vg.json b/examples/compiled/selection_resolution_union.vg.json index 4e64c836da..33f048da54 100644 --- a/examples/compiled/selection_resolution_union.vg.json +++ b/examples/compiled/selection_resolution_union.vg.json @@ -239,8 +239,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -603,8 +608,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Horsepower", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + {"field": "Horsepower", "channel": "y", "type": "R", "index": 1} ] }, { @@ -904,7 +909,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Horsepower", "channel": "x", "type": "R"}] + "value": [ + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -1265,8 +1272,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Miles_per_Gallon", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + }, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -1568,7 +1580,9 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Acceleration", "channel": "x", "type": "R"}] + "value": [ + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0} + ] }, { "name": "brush_translate_anchor", @@ -1927,8 +1941,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Acceleration", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Acceleration", "channel": "y", "type": "R", "index": 1} ] }, { @@ -2232,7 +2246,14 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "Miles_per_Gallon", "channel": "x", "type": "R"}] + "value": [ + { + "field": "Miles_per_Gallon", + "channel": "x", + "type": "R", + "index": 0 + } + ] }, { "name": "brush_translate_anchor", @@ -2593,8 +2614,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Acceleration", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Acceleration", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { @@ -2959,8 +2985,13 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + { + "field": "Miles_per_Gallon", + "channel": "y", + "type": "R", + "index": 1 + } ] }, { diff --git a/examples/compiled/selection_toggle_altKey.vg.json b/examples/compiled/selection_toggle_altKey.vg.json index 362b0a21d9..0792850214 100644 --- a/examples/compiled/selection_toggle_altKey.vg.json +++ b/examples/compiled/selection_toggle_altKey.vg.json @@ -6,7 +6,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "paintbrush_store"}, + { + "name": "paintbrush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -37,16 +40,12 @@ "on": [ { "events": [{"source": "scope", "type": "click"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "paintbrush_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "paintbrush_toggle", "value": false, @@ -80,7 +79,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionIdTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json index 580346ab5f..e085b61dbe 100644 --- a/examples/compiled/selection_toggle_altKey_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_altKey_shiftKey.vg.json @@ -6,7 +6,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "paintbrush_store"}, + { + "name": "paintbrush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -37,16 +40,12 @@ "on": [ { "events": [{"source": "scope", "type": "click"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "paintbrush_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "paintbrush_toggle", "value": false, @@ -80,7 +79,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionIdTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_toggle_shiftKey.vg.json b/examples/compiled/selection_toggle_shiftKey.vg.json index 74e6934c78..6cbdbd05e0 100644 --- a/examples/compiled/selection_toggle_shiftKey.vg.json +++ b/examples/compiled/selection_toggle_shiftKey.vg.json @@ -6,7 +6,10 @@ "height": 200, "style": "cell", "data": [ - {"name": "paintbrush_store"}, + { + "name": "paintbrush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -37,16 +40,12 @@ "on": [ { "events": [{"source": "scope", "type": "click"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: paintbrush_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - { - "name": "paintbrush_tuple_fields", - "value": [{"type": "E", "field": "_vgsid_"}] - }, { "name": "paintbrush_toggle", "value": false, @@ -80,7 +79,7 @@ "opacity": {"value": 0.7}, "fill": [ { - "test": "!length(data(\"paintbrush_store\")) || vlSelectionTest(\"paintbrush_store\", datum)", + "test": "!length(data(\"paintbrush_store\")) || vlSelectionIdTest(\"paintbrush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_translate_brush_drag.vg.json b/examples/compiled/selection_translate_brush_drag.vg.json index 234a882a85..b903e9ece6 100644 --- a/examples/compiled/selection_translate_brush_drag.vg.json +++ b/examples/compiled/selection_translate_brush_drag.vg.json @@ -171,8 +171,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/selection_translate_brush_shift-drag.vg.json b/examples/compiled/selection_translate_brush_shift-drag.vg.json index 0a1ee503c2..29e0f0fc9b 100644 --- a/examples/compiled/selection_translate_brush_shift-drag.vg.json +++ b/examples/compiled/selection_translate_brush_shift-drag.vg.json @@ -171,8 +171,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_drag.vg.json b/examples/compiled/selection_translate_scatterplot_drag.vg.json index 56e1ae94cb..31a7cee54a 100644 --- a/examples/compiled/selection_translate_scatterplot_drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_drag.vg.json @@ -68,8 +68,8 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json index 122f1a31e3..95bae676e3 100644 --- a/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json +++ b/examples/compiled/selection_translate_scatterplot_shift-drag.vg.json @@ -68,8 +68,8 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/selection_type_interval.vg.json b/examples/compiled/selection_type_interval.vg.json index 2586350b46..3fb6eb6d08 100644 --- a/examples/compiled/selection_type_interval.vg.json +++ b/examples/compiled/selection_type_interval.vg.json @@ -166,8 +166,8 @@ { "name": "pts_tuple_fields", "value": [ - {"field": "Cylinders", "channel": "x", "type": "E"}, - {"field": "Origin", "channel": "y", "type": "E"} + {"field": "Cylinders", "channel": "x", "type": "E", "index": 0}, + {"field": "Origin", "channel": "y", "type": "E", "index": 1} ] }, { diff --git a/examples/compiled/selection_type_interval_invert.vg.json b/examples/compiled/selection_type_interval_invert.vg.json index 2d268913ce..50462a8c45 100644 --- a/examples/compiled/selection_type_interval_invert.vg.json +++ b/examples/compiled/selection_type_interval_invert.vg.json @@ -166,8 +166,8 @@ { "name": "pts_tuple_fields", "value": [ - {"field": "Cylinders", "channel": "x", "type": "E"}, - {"field": "Origin", "channel": "y", "type": "E"} + {"field": "Cylinders", "channel": "x", "type": "E", "index": 0}, + {"field": "Origin", "channel": "y", "type": "E", "index": 1} ] }, { diff --git a/examples/compiled/selection_type_point.vg.json b/examples/compiled/selection_type_point.vg.json index 46fc908ff6..74719ff3bd 100644 --- a/examples/compiled/selection_type_point.vg.json +++ b/examples/compiled/selection_type_point.vg.json @@ -4,7 +4,10 @@ "padding": 5, "style": "cell", "data": [ - {"name": "pts_store"}, + { + "name": "pts_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -46,13 +49,12 @@ "on": [ { "events": [{"source": "scope", "type": "click"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, { "name": "pts_toggle", "value": false, @@ -85,7 +87,7 @@ "update": { "fill": [ { - "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", + "test": "!length(data(\"pts_store\")) || vlSelectionIdTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_type_single_dblclick.vg.json b/examples/compiled/selection_type_single_dblclick.vg.json index c05f63449c..781463377f 100644 --- a/examples/compiled/selection_type_single_dblclick.vg.json +++ b/examples/compiled/selection_type_single_dblclick.vg.json @@ -4,7 +4,10 @@ "padding": 5, "style": "cell", "data": [ - {"name": "pts_store"}, + { + "name": "pts_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -46,13 +49,12 @@ "on": [ { "events": [{"source": "scope", "type": "dblclick"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, { "name": "pts_toggle", "value": false, @@ -85,7 +87,7 @@ "update": { "fill": [ { - "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", + "test": "!length(data(\"pts_store\")) || vlSelectionIdTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_type_single_mouseover.vg.json b/examples/compiled/selection_type_single_mouseover.vg.json index c8c7b17ebe..e5e484e255 100644 --- a/examples/compiled/selection_type_single_mouseover.vg.json +++ b/examples/compiled/selection_type_single_mouseover.vg.json @@ -4,7 +4,10 @@ "padding": 5, "style": "cell", "data": [ - {"name": "pts_store"}, + { + "name": "pts_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", @@ -46,13 +49,12 @@ "on": [ { "events": [{"source": "scope", "type": "mouseover"}], - "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: pts_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]]} : null", + "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null", "force": true }, {"events": [{"source": "view", "type": "dblclick"}], "update": "null"} ] }, - {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "_vgsid_"}]}, { "name": "pts_toggle", "value": false, @@ -85,7 +87,7 @@ "update": { "fill": [ { - "test": "!length(data(\"pts_store\")) || vlSelectionTest(\"pts_store\", datum)", + "test": "!length(data(\"pts_store\")) || vlSelectionIdTest(\"pts_store\", datum)", "scale": "color", "field": "__count" }, diff --git a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json index 7362482219..e571b63d90 100644 --- a/examples/compiled/selection_zoom_brush_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_shift-wheel.vg.json @@ -171,8 +171,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/selection_zoom_brush_wheel.vg.json b/examples/compiled/selection_zoom_brush_wheel.vg.json index 234a882a85..b903e9ece6 100644 --- a/examples/compiled/selection_zoom_brush_wheel.vg.json +++ b/examples/compiled/selection_zoom_brush_wheel.vg.json @@ -171,8 +171,8 @@ { "name": "brush_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json index 63d372ae17..f4cc82a4b9 100644 --- a/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_shift-wheel.vg.json @@ -68,8 +68,8 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json index 56e1ae94cb..31a7cee54a 100644 --- a/examples/compiled/selection_zoom_scatterplot_wheel.vg.json +++ b/examples/compiled/selection_zoom_scatterplot_wheel.vg.json @@ -68,8 +68,8 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "Horsepower", "channel": "x", "type": "R"}, - {"field": "Miles_per_Gallon", "channel": "y", "type": "R"} + {"field": "Horsepower", "channel": "x", "type": "R", "index": 0}, + {"field": "Miles_per_Gallon", "channel": "y", "type": "R", "index": 1} ] }, { diff --git a/examples/compiled/trellis_selections.vg.json b/examples/compiled/trellis_selections.vg.json index 4aabf916a0..f38cfb4bfd 100644 --- a/examples/compiled/trellis_selections.vg.json +++ b/examples/compiled/trellis_selections.vg.json @@ -236,7 +236,7 @@ }, { "name": "brush_tuple_fields", - "value": [{"field": "X", "channel": "x", "type": "R"}] + "value": [{"field": "X", "channel": "x", "type": "R", "index": 0}] }, { "name": "brush_translate_anchor", @@ -369,8 +369,8 @@ { "name": "grid_tuple_fields", "value": [ - {"field": "X", "channel": "x", "type": "R"}, - {"field": "Y", "channel": "y", "type": "R"} + {"field": "X", "channel": "x", "type": "R", "index": 0}, + {"field": "Y", "channel": "y", "type": "R", "index": 1} ] }, { @@ -444,7 +444,10 @@ "name": "xenc_tuple", "update": "xenc_X !== null ? {fields: xenc_tuple_fields, values: [xenc_X]} : null" }, - {"name": "xenc_tuple_fields", "value": [{"type": "E", "field": "X"}]}, + { + "name": "xenc_tuple_fields", + "value": [{"type": "E", "field": "X", "index": 0}] + }, { "name": "xenc_modify", "on": [ diff --git a/examples/compiled/vconcat_flatten.vg.json b/examples/compiled/vconcat_flatten.vg.json index 8373fed7e5..a6e096dd0c 100644 --- a/examples/compiled/vconcat_flatten.vg.json +++ b/examples/compiled/vconcat_flatten.vg.json @@ -116,7 +116,10 @@ } ] }, - {"name": "pts_tuple_fields", "value": [{"type": "E", "field": "id"}]}, + { + "name": "pts_tuple_fields", + "value": [{"type": "E", "field": "id", "index": 0}] + }, { "name": "pts_toggle", "value": false,