singleview_6_2_clustered-bar.vl.json 576 Bytes
Newer Older
Danyel Fisher committed
1 2 3 4 5 6 7 8 9 10
{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "config": {"background":"#ffffff"},
  "mark": "bar",
  "data": {"url": "data/complaints.csv", "format": {"type": "csv"}},
  "transform": [{
    "as": "relief",
    "calculate": "indexof(datum['Company response to consumer'], 'relief') >= 0"
  }],
  "encoding": {
11 12
    "column": {"field": "Product", "type": "nominal", "header": {"title": ""}},
    "y": {"aggregate": "count", "type": "quantitative"},
Danyel Fisher committed
13 14 15 16
    "x": {"field": "relief", "type": "nominal"},
    "color": {"field": "Product", "type": "nominal"}
  }
}