Skip to content
Vega-Lite templates

Physics — Chart: Planet Orbital Periods

Orbital period of each planet (log scale, years).

Template previewVega-Lite
Rendering…

Make it your own.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Orbital period (Earth years)",
  "data": {"values": [
    {"planet": "Mercury", "years": 0.24},
    {"planet": "Venus", "years": 0.62},
    {"planet": "Earth", "years": 1.0},
    {"planet": "Mars", "years": 1.88},
    {"planet": "Jupiter", "years": 11.9},
    {"planet": "Saturn", "years": 29.5},
    {"planet": "Uranus", "years": 84},
    {"planet": "Neptune", "years": 165}
  ]},
  "mark": "bar",
  "encoding": {
    "x": {"field": "planet", "type": "nominal", "sort": null, "title": "Planet"},
    "y": {"field": "years", "type": "quantitative", "scale": {"type": "log"}, "title": "period (yr, log)"},
    "color": {"field": "planet", "type": "nominal", "legend": null}
  }
}