Simple Bar Chart with Labels

View this example in the online editor

Vega-Lite JSON Specification

{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "description": "A simple bar chart with embedded data.",
  "data": {
    "values": [
      {"a": "A","b": 28},
      {"a": "B","b": 55},
      {"a": "C","b": 43}
    ]
  },
  "layer": [{
    "mark": "bar",
    "encoding": {
      "y": {"field": "a", "type": "ordinal"},
      "x": {"field": "b", "type": "quantitative"}
    }
  }, {
    "mark": {
      "type": "text",
      "align": "left",
      "baseline": "middle",
      "dx": 3
    },
    "encoding": {
      "y": {"field": "a", "type": "ordinal"},
      "x": {"field": "b", "type": "quantitative"},
      "text": {"field": "b", "type": "quantitative"}
    }
  }]
}