如何使用垂直或水平运算符在 Vega 中连接多个视图?

How to concat Multiple view in Vega using either vertical or horizontal operator?

我想使用垂直或水平运算符在 Vega 中连接多个视图? 我试图将一个规范放在 "vconcat" 数组中,但可视化不是 showing.what 我要为多个视图做的。

我经历了以下link https://vega.github.io/vega-lite/docs/concat.html

有人帮忙举个例子吗? 谢谢

https://vega.github.io/editor/#/examples/vega-lite/overview_detail 使用连接。

{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {"url": "data/sp500.csv"},
"vconcat": [{
    "width": 480,
    "mark": "area",
    "encoding": {
    "x": {
        "field": "date",
        "type": "temporal",
        "scale": {"domain": {"selection": "brush"}},
        "axis": {"title": "", "labelAngle": 0}
    },
    "y": {"field": "price","type": "quantitative"}
    }
}, {
    "width": 480,
    "height": 60,
    "mark": "area",
    "selection": {
    "brush": {"type": "interval", "encodings": ["x"]}
    },
    "encoding": {
    "x": {
        "field": "date",
        "type": "temporal",
        "axis": {"format": "%Y", "labelAngle": 0}
    },
    "y": {
        "field": "price",
        "type": "quantitative",
        "axis": {"tickCount": 3, "grid": false}
    }
    }
}]
}