Course contentsShow
← Data Science
Lesson 1221 of 2,14531. Data Visualization PrinciplesFree lesson

Line Charts for Time Series and Trends

Master line charts for displaying temporal data, trends over time, and continuous relationships between variables.

Line Charts for Time Series and Trends

You'll learn when and how to use line charts to reveal patterns, trends, and changes over time in your data.

What Line Charts Show

A line chart connects individual data points with continuous lines, making it ideal for displaying how something changes over time or across an ordered sequence. Think of it like tracing a path through your data—the slope of the line shows the rate of change, and the overall shape reveals trends and patterns.

Line charts work best when:

  • Your x-axis represents time (days, months, years) or another continuous, ordered variable
  • You want to emphasize trends and overall movement rather than individual values
  • Data points are relatively frequent and connected in sequence

When to Choose Line Charts Over Bar Charts

Use line charts when continuity matters. If you're showing daily temperature readings, a line chart emphasizes the flow from one day to the next. Use bar charts when each category is independent (like sales by product category).

The key is order and continuity—line charts imply that the space between points is meaningful and part of a continuous process.

Multiple Lines for Comparison

Line charts excel at comparing multiple time series on the same axes. You can plot several lines (different colors or styles) to compare trends across groups: website traffic from different sources, sales across regions, or stock prices for competing companies. This reveals not just individual trends but also divergence, convergence, and relative performance.

Common Pitfalls

Avoid using line charts for categorical data without natural order—connecting "red," "blue," and "green" with a line makes no logical sense. Also, starting your y-axis at a value other than zero can exaggerate trends and mislead viewers about the magnitude of change.

Key Takeaway: Line charts are your go-to visualization for revealing temporal patterns and trends in sequential data, emphasizing continuity and change over time rather than discrete comparisons.