Connected Scatterplot (Lines with Custom Paths)

View this example in the online editor

Vega-Lite JSON Specification

{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "data": {"url": "data/driving.json"},
  "layer": [{
    "mark": "line",
    "encoding": {
      "x": {"field": "miles","type": "quantitative", "scale": {"zero": false}},
      "y": {"field": "gas","type": "quantitative", "scale": {"zero": false}},
      "order": {"field": "year","type": "temporal"}
    }
  }, {
    "mark": {"type": "point", "filled": true},
    "encoding": {
      "x": {"field": "miles","type": "quantitative", "scale": {"zero": false}},
      "y": {"field": "gas","type": "quantitative", "scale": {"zero": false}}
    }
  }]
}