Nested View Concatenation Aligned with Axis `minExtent`
Nested concatenation aligned by setting axis minExtent
View this example in the online editor
Vega-Lite JSON Specification
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "Nested concatenation aligned by setting axis minExtent",
"data": {
"url": "data/movies.json"
},
"vconcat": [{
"title": "Ratings",
"repeat": {"column": ["Rotten Tomatoes Rating", "IMDB Rating"]},
"spec": {
"width": 150,
"height": 50,
"mark": "bar",
"encoding": {
"x": {
"field": {"repeat": "column"},
"bin": {"maxbins": 20}
},
"y": {"aggregate": "count"}
}
}
},{
"title": "Gross",
"repeat": {"column": ["US Gross", "Worldwide Gross"]},
"spec": {
"width": 150,
"height": 50,
"encoding": {
"x": {
"field": {"repeat": "column"},
"bin": {"maxbins": 20}
},
"y": {"aggregate": "count"}
},
"mark": "bar"
}
}],
"config": {
"countTitle": "Count",
"axisX": {"titleLimit": 150},
"axisY": {
"minExtent": 40
}
}
}