Bug Description
When aggregating a field, groups alphabetically prior to a group where the values for the field are all NULL will not render.
In this example, denials in GroupA is always amount=NULL and the categories aaa, charges do not render for that group. Everything works fine for GroupB presumably because denials has at least one non-NULL entry.
{
"$schema": "https://vega.github.io/schema/vega-lite/v6.json",
"description": "Bug: categories alphabetically prior to an all-NULL category will not render",
"data": {
"values": [
{"grouping": "GroupA", "type": "aaa", "amount": 100},
{"grouping": "GroupA", "type": "charges", "amount": 100},
{"grouping": "GroupA", "type": "denials", "amount": null},
{"grouping": "GroupA", "type": "denials", "amount": null},
{"grouping": "GroupA", "type": "yyy", "amount": 100},
{"grouping": "GroupA", "type": "zzz", "amount": 100},
{"grouping": "GroupB", "type": "aaa", "amount": 100},
{"grouping": "GroupB", "type": "charges", "amount": 100},
{"grouping": "GroupB", "type": "denials", "amount": 100},
{"grouping": "GroupB", "type": "denials", "amount": null},
{"grouping": "GroupB", "type": "yyy", "amount": 100},
{"grouping": "GroupB", "type": "zzz", "amount": 100}
]
},
"mark": {"type": "bar"},
"encoding": {
"x": {
"field": "grouping",
"type": "nominal",
"title": "Group"
},
"y": {
"aggregate": "sum",
"field": "amount",
"type": "quantitative",
"title": "Sum of Amount"
},
"color": {
"field": "type",
"type": "nominal"
}
}
}
Vega-Editor.
Bug Description
When aggregating a field, groups alphabetically prior to a group where the values for the field are all NULL will not render.
In this example,
denialsinGroupAis alwaysamount=NULLand the categoriesaaa, chargesdo not render for that group. Everything works fine forGroupBpresumably becausedenialshas at least one non-NULL entry.{ "$schema": "https://vega.github.io/schema/vega-lite/v6.json", "description": "Bug: categories alphabetically prior to an all-NULL category will not render", "data": { "values": [ {"grouping": "GroupA", "type": "aaa", "amount": 100}, {"grouping": "GroupA", "type": "charges", "amount": 100}, {"grouping": "GroupA", "type": "denials", "amount": null}, {"grouping": "GroupA", "type": "denials", "amount": null}, {"grouping": "GroupA", "type": "yyy", "amount": 100}, {"grouping": "GroupA", "type": "zzz", "amount": 100}, {"grouping": "GroupB", "type": "aaa", "amount": 100}, {"grouping": "GroupB", "type": "charges", "amount": 100}, {"grouping": "GroupB", "type": "denials", "amount": 100}, {"grouping": "GroupB", "type": "denials", "amount": null}, {"grouping": "GroupB", "type": "yyy", "amount": 100}, {"grouping": "GroupB", "type": "zzz", "amount": 100} ] }, "mark": {"type": "bar"}, "encoding": { "x": { "field": "grouping", "type": "nominal", "title": "Group" }, "y": { "aggregate": "sum", "field": "amount", "type": "quantitative", "title": "Sum of Amount" }, "color": { "field": "type", "type": "nominal" } } }Vega-Editor.