diff --git a/examples/compiled/selection_type_region.png b/examples/compiled/selection_type_region.png index e69de29bb2..e4b6b0a18e 100644 Binary files a/examples/compiled/selection_type_region.png and b/examples/compiled/selection_type_region.png differ diff --git a/examples/compiled/selection_type_region.svg b/examples/compiled/selection_type_region.svg index e69de29bb2..012820c235 100644 --- a/examples/compiled/selection_type_region.svg +++ b/examples/compiled/selection_type_region.svg @@ -0,0 +1 @@ +050100150200Horsepower01020304050Miles_per_Gallon34568Cylinders \ No newline at end of file diff --git a/examples/compiled/selection_type_region.vg.json b/examples/compiled/selection_type_region.vg.json index 8c8188605c..248e8b9f87 100644 --- a/examples/compiled/selection_type_region.vg.json +++ b/examples/compiled/selection_type_region.vg.json @@ -6,12 +6,16 @@ "height": 200, "style": "cell", "data": [ - {"name": "brush_store"}, + { + "name": "brush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, { "name": "source_0", "url": "data/cars.json", "format": {"type": "json"}, "transform": [ + {"type": "identifier", "as": "_vgsid_"}, { "type": "filter", "expr": "isValid(datum[\"Horsepower\"]) && isFinite(+datum[\"Horsepower\"]) && isValid(datum[\"Miles_per_Gallon\"]) && isFinite(+datum[\"Miles_per_Gallon\"])" @@ -63,7 +67,6 @@ } ] }, - {"name": "brush_tuple_fields", "value": []}, { "name": "brush_modify", "on": [ @@ -86,7 +89,15 @@ "strokeWidth": {"value": 2}, "strokeDash": {"value": [8, 5]} }, - "update": {"path": {"signal": "lassoPath(brush_screen_path)"}} + "update": { + "path": [ + { + "test": "data(\"brush_store\").length && data(\"brush_store\")[0].unit === \"\"", + "signal": "lassoPath(brush_screen_path)" + }, + {"value": "[]"} + ] + } } }, { @@ -101,7 +112,7 @@ "fill": {"value": "transparent"}, "stroke": [ { - "test": "!length(data(\"brush_store\")) || vlSelectionTest(\"brush_store\", datum)", + "test": "!length(data(\"brush_store\")) || vlSelectionIdTest(\"brush_store\", datum)", "scale": "color", "field": "Cylinders" }, diff --git a/examples/compiled/selection_type_region_concat.png b/examples/compiled/selection_type_region_concat.png index aee9b59f58..b60a354704 100644 Binary files a/examples/compiled/selection_type_region_concat.png and b/examples/compiled/selection_type_region_concat.png differ diff --git a/examples/compiled/selection_type_region_concat.svg b/examples/compiled/selection_type_region_concat.svg index da5d98415d..ca5ed93060 100644 --- a/examples/compiled/selection_type_region_concat.svg +++ b/examples/compiled/selection_type_region_concat.svg @@ -1 +1 @@ -050100150200Horsepower01020304050Miles_per_Gallon \ No newline at end of file +050100150200Horsepower01020304050Miles_per_Gallon0510152025Acceleration0100200300400500Displacement \ No newline at end of file diff --git a/examples/compiled/selection_type_region_concat.vg.json b/examples/compiled/selection_type_region_concat.vg.json index a52c2b7eb4..eee77a571e 100644 --- a/examples/compiled/selection_type_region_concat.vg.json +++ b/examples/compiled/selection_type_region_concat.vg.json @@ -5,8 +5,16 @@ "padding": 5, "width": 200, "data": [ - {"name": "brush_store"}, - {"name": "source_0", "url": "data/cars.json", "format": {"type": "json"}}, + { + "name": "brush_store", + "transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] + }, + { + "name": "source_0", + "url": "data/cars.json", + "format": {"type": "json"}, + "transform": [{"type": "identifier", "as": "_vgsid_"}] + }, { "name": "data_0", "source": "source_0", @@ -91,7 +99,6 @@ } ] }, - {"name": "brush_tuple_fields", "value": []}, { "name": "brush_modify", "on": [ @@ -114,7 +121,15 @@ "strokeWidth": {"value": 2}, "strokeDash": {"value": [2, 8]} }, - "update": {"path": {"signal": "lassoPath(brush_screen_path)"}} + "update": { + "path": [ + { + "test": "data(\"brush_store\").length && data(\"brush_store\")[0].unit === \"concat_0\"", + "signal": "lassoPath(brush_screen_path)" + }, + {"value": "[]"} + ] + } } }, {