简体   繁体   中英

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

i want to concat Multiple view in Vega using either vertical or horizontal operator? i'm trying to put one specification inside "vconcat" array but visiualization is doesn't showing.what i to do for multiple view.

i gone through the following link https://vega.github.io/vega-lite/docs/concat.html

Any one help to give sample example? Thanks

https://vega.github.io/editor/#/examples/vega-lite/overview_detail uses concat.

在此处输入图片说明

{
"$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}
    }
    }
}]
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM