Skip to content
Vega-Lite templates

Math — Chart: Trend Over Time

A rate trend across several years.

Template previewVega-Lite
Rendering…

Make it your own.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Rate over time",
  "data": {"values": [
    {"year": 2016, "rate": 62},
    {"year": 2017, "rate": 58},
    {"year": 2018, "rate": 55},
    {"year": 2019, "rate": 49},
    {"year": 2020, "rate": 41},
    {"year": 2021, "rate": 44},
    {"year": 2022, "rate": 39}
  ]},
  "mark": {"type": "line", "point": true},
  "encoding": {
    "x": {"field": "year", "type": "ordinal", "title": "year"},
    "y": {"field": "rate", "type": "quantitative", "title": "rate per 1000"}
  }
}