Vega-Lite Multi-Series Line

A 3-series time-series line chart where each series is automatically given its own colour from the categorical palette. The Vega-Lite spec is a single `line` mark with a `color` channel — the data is in long format (one row per date × series), and Vega-Lite groups, sorts, and con

Template details

  • chart
  • line
  • multi-series
  • time-series
  • vega
  • vega-lite

When to use this template

This visualization excels at comparing the temporal evolution of several distinct categories or groups against a common timeline. Analysts reach for it to identify trends, track relative performance, detect anomalies, or observe how different segments respond to events over time. It makes it easy to see which series is leading, lagging, or diverging from others.

  • Data structured in long format (date, series_category, value).
  • Time-series data with a consistent, granular time dimension.
  • Multiple distinct categorical series (ideally 2-6) for comparison.
  • Series values sharing a common unit and scale for direct comparison.
  • Regularly sampled or aggregated data points over time.
  • Comparing trends of several related entities over the same period.

Browse all Koan templates