{
  "data": {"url": "data/barley.json"},
  "mark": "bar",
  "encoding": {
    "x": {"aggregate": "sum", "field": "yield", "type": "quantitative"},
    "y": {"field": "variety", "type": "nominal"},
    "color": {"field": "site", "type": "nominal"},
    "order": {"aggregate": "sum", "field": "yield", "type": "nominal"}
  }
}

{
  "data": {"url": "data/barley.json"},
  "mark": "bar",
  "encoding": {
    "x": {"aggregate": "sum", "field": "yield", "type": "quantitative"},
    "y": {"field": "variety", "type": "nominal"},
    "color": {"field": "site", "type": "nominal"},
    "order": {"aggregate": "sum", "field": "yield", "type": "quantitative"}
  }
}

Correct type for stacked bar horizontal order example
Correct type for stacked bar horizontal order example
