mattijn
7/12/2017 - 9:01 PM

vl2_detail_overview_y_axxes

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