This website is for Vega-Lite v2. Go to the main Vega-Lite homepage for the latest release.

Horizontally repeated charts

Horizontally repeated charts that show the histograms of different parameters of cars in different countries

View this example in the online editor

Vega-Lite JSON Specification

{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "repeat": {"column": ["Horsepower","Miles_per_Gallon", "Acceleration"]},
  "spec": {
    "data": {"url": "data/cars.json"},
    "mark": "bar",
    "encoding": {
      "x": {
        "field": {"repeat": "column"},
        "bin": true,
        "type": "quantitative"
      },
      "y": {"aggregate": "count","type": "quantitative"},
      "color": {"field": "Origin","type": "nominal"}
    }
  }
}