2017-08-12 5 views
0

私は、垂直または水平の演算子を使ってVegaの複数のビューを連結したいですか? 私は1つの仕様を "vconcat"配列に入れようとしていますが、visiualizationは表示されません。複数のビューに対して何をするか。コンカートする方法垂直または水平の演算子を使用してVegaの複数のビューを作成しますか?

iは、次のリンク https://vega.github.io/vega-lite/docs/concat.html

サンプル例を与えるために、いずれかの助けを経て? ありがとう

答えて

1

https://vega.github.io/editor/#/examples/vega-lite/overview_detailはconcatを使用しています。

enter image description here

{ 
"$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} 
    } 
    } 
}] 
} 
関連する問題