Vertical Concatenation
Two vertically concatenated charts
View this example in the online editor
Vega-Lite JSON Specification
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Two vertically concatenated charts that show a histogram of precipitation in Seattle and the relationship between min and max temperature.",
"data": {
"url": "data/weather.csv"
},
"transform": [{
"filter": "datum.location === 'Seattle'"
}],
"vconcat": [
{
"mark": "bar",
"encoding": {
"x": {
"timeUnit": "month",
"field": "date",
"type": "ordinal"
},
"y": {
"aggregate": "mean",
"field": "precipitation",
"type": "quantitative"
}
}
},
{
"mark": "point",
"encoding": {
"x": {
"field": "temp_min",
"type": "quantitative",
"bin": true
},
"y": {
"field": "temp_max",
"type": "quantitative",
"bin": true
},
"size": {
"aggregate": "count",
"type": "quantitative"
}
}
}
]
}