Skip to content

Commit

Permalink
fix: only run simple optimizations before facet nodes are moved (#6453)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>
  • Loading branch information
domoritz and GitHub Actions Bot committed Jun 17, 2020
1 parent b319be8 commit 5c1941b
Show file tree
Hide file tree
Showing 11 changed files with 443 additions and 36 deletions.
Binary file modified examples/compiled/facet_bullet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 11 additions & 11 deletions examples/compiled/facet_bullet.vg.json
Expand Up @@ -80,12 +80,7 @@
]
},
{
"name": "row_domain",
"source": "data_0",
"transform": [{"type": "aggregate", "groupby": ["title"]}]
},
{
"name": "data_2",
"name": "data_1",
"source": "data_0",
"transform": [
{
Expand All @@ -95,7 +90,7 @@
]
},
{
"name": "data_3",
"name": "data_2",
"source": "data_0",
"transform": [
{
Expand All @@ -105,7 +100,7 @@
]
},
{
"name": "data_4",
"name": "data_3",
"source": "data_0",
"transform": [
{
Expand All @@ -115,7 +110,7 @@
]
},
{
"name": "data_5",
"name": "data_4",
"source": "data_0",
"transform": [
{
Expand All @@ -125,7 +120,7 @@
]
},
{
"name": "data_6",
"name": "data_5",
"source": "data_0",
"transform": [
{
Expand All @@ -135,14 +130,19 @@
]
},
{
"name": "data_7",
"name": "data_6",
"source": "data_0",
"transform": [
{
"type": "filter",
"expr": "isValid(datum[\"markers.0\"]) && isFinite(+datum[\"markers.0\"])"
}
]
},
{
"name": "row_domain",
"source": "data_0",
"transform": [{"type": "aggregate", "groupby": ["title"]}]
}
],
"signals": [
Expand Down
Binary file modified examples/compiled/facet_independent_scale_layer_broken.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 33 additions & 14 deletions examples/compiled/facet_independent_scale_layer_broken.vg.json
Expand Up @@ -14,13 +14,6 @@
"type": "formula",
"expr": "datum.sex == 2 ? 'Female' : 'Male'",
"as": "gender"
},
{
"type": "aggregate",
"groupby": ["age", "gender"],
"ops": ["sum"],
"fields": ["people"],
"as": ["sum_people"]
}
]
},
Expand All @@ -38,8 +31,21 @@
]
},
{
"name": "data_2",
"name": "data_1",
"source": "source_0",
"transform": [
{
"type": "aggregate",
"groupby": ["age", "gender"],
"ops": ["sum"],
"fields": ["people"],
"as": ["sum_people"]
}
]
},
{
"name": "data_2",
"source": "data_1",
"transform": [
{
"type": "filter",
Expand Down Expand Up @@ -126,6 +132,19 @@
{
"source": "facet",
"name": "data_0",
"transform": [
{
"type": "aggregate",
"groupby": ["age", "gender"],
"ops": ["sum"],
"fields": ["people"],
"as": ["sum_people"]
}
]
},
{
"name": "data_1",
"source": "data_0",
"transform": [
{
"type": "filter",
Expand All @@ -149,7 +168,7 @@
"from": {
"facet": {
"name": "faceted_path_child_layer_0_main",
"data": "facet",
"data": "data_0",
"groupby": ["gender"]
}
},
Expand Down Expand Up @@ -186,7 +205,7 @@
"name": "child_layer_1_marks",
"type": "symbol",
"style": ["point"],
"from": {"data": "data_0"},
"from": {"data": "data_1"},
"encode": {
"update": {
"fill": {"value": "transparent"},
Expand All @@ -207,8 +226,8 @@
"type": "point",
"domain": {
"fields": [
{"data": "facet", "field": "age"},
{"data": "data_0", "field": "age"}
{"data": "data_0", "field": "age"},
{"data": "data_1", "field": "age"}
],
"sort": true
},
Expand Down Expand Up @@ -251,7 +270,7 @@
"type": "linear",
"domain": {
"fields": [
{"data": "source_0", "field": "sum_people"},
{"data": "data_1", "field": "sum_people"},
{"data": "data_2", "field": "sum_people"}
]
},
Expand All @@ -264,7 +283,7 @@
"type": "ordinal",
"domain": {
"fields": [
{"data": "source_0", "field": "gender"},
{"data": "data_1", "field": "gender"},
{"data": "data_2", "field": "gender"}
],
"sort": true
Expand Down
Binary file added examples/compiled/line_concat_facet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/compiled/line_concat_facet.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5c1941b

Please sign in to comment.