multiview_10_crossfilter.vl.json 1.7 KB
Newer Older
Danyel Fisher committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json", 
  "config":{"background":"#ffffff"},
  "data": {"url": "data/europe_world_bank.csv"},
  "hconcat": [
    {
      "repeat": {
        "column": ["Population_ages_15_64_of_total", "Population_ages_65_and_above_of_total"]
      },
      "spec": {
        "mark": "bar",
        "height": 700,
        "selection": {
          "brush": {
            "type": "interval",
            "encodings": ["y"],
17
            "resolve": "intersect"
Danyel Fisher committed
18 19 20 21 22 23 24 25
          }
        },
        "encoding": {
          "y": {
            "field": "Country",
            "type": "ordinal",
            "sort": {
              "op": "min",
26
              "field": { "repeat":"column"},
Danyel Fisher committed
27 28 29 30
              "order": "descending"
            }
          },
          "x": {
31
            "field": { "repeat": "column"},
Danyel Fisher committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
            "type": "quantitative"
          },
          "color": {
            "condition": {"selection": {"not": "brush"}, "value": "steelblue"},
            "value": "goldenrod"
          }
        }
      }
    },
    {
      "mark": "point",
      "width": 260,
      "height": 260,
      "selection": {
        "brush": {
          "type": "interval",
48
          "resolve": "intersect"
Danyel Fisher committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
        }
        },
      "encoding": {
        "y": {
          "field": "Population_ages_15_64_of_total",
          "type": "quantitative",
          "scale": {"zero": false}
        },
        "x": {
          "field": "Population_ages_65_and_above_of_total",
          "type": "quantitative",
          "scale": {"zero": false}
        },
        "color": {
          "condition": {"selection": {"not": "brush"}, "value": "steelblue"},
          "value": "goldenrod"
        }
      }
    }
  ]
}