Line Chart

Learn how to draw a line chart and its alternatives in Altair.

Line charts, also known as line plots or line graphs, visualize data over time. They consist of data points connected by straight lines, which makes it easy to see how the data has changed over time. Line charts are particularly useful for showing trends and patterns in data and comparing multiple data series.

Press + to interact
An example of a line chart
An example of a line chart

When are line charts useful?

Line charts are useful when:

  • We know that the data is continuous and changes over time, such as stock prices, temperature data, or traffic patterns.

  • We want to compare multiple data series, such as ...