Skip to content

Commit

Permalink
fix(#9343): binned stacked area now correctly filter null values
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed May 9, 2024
1 parent 386df68 commit d5a2070
Show file tree
Hide file tree
Showing 57 changed files with 2,845 additions and 591 deletions.
956 changes: 759 additions & 197 deletions build/vega-lite-schema.json

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions examples/specs/test_config_scale_invalid.vl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Testing invalid",
"data": {
"values": [
{"a": 1, "b": 15, "c": 1},
{"a": 2, "b": 25, "c": 1},
{"a": 3, "b": 20, "c": 1},
{"a": 1, "b": 12, "c": 2},
{"a": 2, "b": 21, "c": 2},
{"a": 3, "b": 29, "c": 2},
{"a": 1, "b": 8, "c": null},
{"a": 2, "b": 31, "c": null},
{"a": 3, "b": 49, "c": null}
]
},
"config": {
"mark": {"invalid": "filter"},
"scale": {"invalid": {"color": {"value": "#aaa"}, "size": {"value": 4}}}
},
"concat": [{
"title": "Color",
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"},
"color": {"field": "c", "type": "quantitative"}
}
}, {
"title": "Size",
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"},
"size": {"field": "c", "type": "quantitative"}
}
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Testing invalid",
"data": {
"values": [
{"a": 1, "b": 15, "c": 1},
{"a": 2, "b": 25, "c": 1},
{"a": 3, "b": 20, "c": 1},
{"a": 1, "b": 12, "c": 2},
{"a": 2, "b": 21, "c": 2},
{"a": 3, "b": 29, "c": 2},
{"a": 1, "b": 8, "c": null},
{"a": 2, "b": 31, "c": null},
{"a": 3, "b": 49, "c": null}
]
},
"config": {
"mark": {"invalid": "filter"}
},
"concat": [{
"title": "Color",
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"},
"color": {"field": "c", "type": "quantitative"}
}
}, {
"title": "Size",
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"},
"size": {"field": "c", "type": "quantitative"}
}
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Testing invalid",
"data": {
"values": [
{"a": 1, "b": 15, "c": 1},
{"a": 2, "b": 25, "c": 1},
{"a": 3, "b": 20, "c": 1},
{"a": 1, "b": 12, "c": 2},
{"a": 2, "b": 21, "c": 2},
{"a": 3, "b": 29, "c": 2},
{"a": 1, "b": 8, "c": null},
{"a": 2, "b": 31, "c": null},
{"a": 3, "b": 49, "c": null}
]
},
"config": {
"mark": {"invalid": "include"}
},
"concat": [{
"title": "Color",
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"},
"color": {"field": "c", "type": "quantitative"}
}
}, {
"title": "Size",
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"},
"size": {"field": "c", "type": "quantitative"}
}
}]
}
90 changes: 90 additions & 0 deletions examples/specs/test_invalid_break_paths.vl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Testing invalid",
"data": {
"values": [
{"a": null, "b": 100},
{"a": -10, "b": null},
{"a": -5, "b": -25},
{"a": -1, "b": -20},
{"a": 0, "b": null},
{"a": 1, "b": 30},
{"a": 5, "b": 40},
{"a": 10, "b": null}
]
},
"config": {
"mark": {"invalid": "break-paths"}
},
"vconcat": [{
"title": "Quantitative X",
"hconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}]
},{
"title": "Ordinal X",
"hconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}]
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Testing invalid",
"data": {
"values": [
{"a": null, "b": 100},
{"a": -10, "b": null},
{"a": -5, "b": -25},
{"a": -1, "b": -20},
{"a": 0, "b": null},
{"a": 1, "b": 30},
{"a": 5, "b": 40},
{"a": 10, "b": null}
]
},
"config": {
"mark": {"invalid": "break-paths-and-keep-path-domains"}
},
"vconcat": [{
"title": "Quantitative X",
"hconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}]
},{
"title": "Ordinal X",
"hconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}]
}]
}
90 changes: 90 additions & 0 deletions examples/specs/test_invalid_break_paths_keep_domains.vl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Testing invalid",
"data": {
"values": [
{"a": null, "b": 100},
{"a": -10, "b": null},
{"a": -5, "b": -25},
{"a": -1, "b": -20},
{"a": 0, "b": null},
{"a": 1, "b": 30},
{"a": 5, "b": 40},
{"a": 10, "b": null}
]
},
"config": {
"mark": {"invalid": "break-paths-keep-domains"}
},
"vconcat": [{
"title": "Quantitative X",
"hconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "quantitative"},
"y": {"field": "b", "type": "quantitative"}
}
}]
},{
"title": "Ordinal X",
"hconcat": [{
"width": 100,
"height": 100,
"mark": "point",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}, {
"width": 100,
"height": 100,
"mark": "area",
"encoding": {
"x": {"field": "a", "type": "ordinal"},
"y": {"field": "b", "type": "quantitative"}
}
}]
}]
}

0 comments on commit d5a2070

Please sign in to comment.