Charts over time
Lines, calendars, seasonal plots and decompositions, with honest treatment of gaps, scales and dual axes.
You will be able to
- Choose a chart for trend, cycle or a single spike
- Show gaps in a series honestly
- Explain why dual axes mislead
Read first
The line chart's promise
ReadA line says values change continuously from one point to the next. That fits daily temperature. It doesn't fit categories, or gaps: a line across three missing months invents data you don't have.
Show a gap as a gap, and don't sort a time axis by anything other than time.
View data
| date | sales | region | event |
|---|---|---|---|
| 1,672,617,600,000 | 109.30 | North | — |
| 1,672,617,600,000 | 68.500 | South | — |
| 1,672,617,600,000 | 59.700 | West | — |
| 1,672,704,000,000 | 115.50 | North | — |
| 1,672,704,000,000 | 77.100 | South | — |
| 1,672,704,000,000 | 68.800 | West | — |
| 1,672,790,400,000 | 115.50 | North | — |
| 1,672,790,400,000 | 74.800 | South | — |
| 1,672,790,400,000 | 46.800 | West | — |
| 1,672,876,800,000 | 110.80 | North | — |
| 1,672,876,800,000 | 96 | South | — |
| 1,672,876,800,000 | 74 | West | — |
| 1,672,963,200,000 | 109.50 | North | — |
| 1,672,963,200,000 | 87.800 | South | — |
| 1,672,963,200,000 | 78.100 | West | — |
| 1,673,049,600,000 | 85.500 | North | — |
| 1,673,049,600,000 | 65.600 | South | — |
| 1,673,049,600,000 | 48.400 | West | — |
| 1,673,136,000,000 | 76.100 | North | — |
| 1,673,136,000,000 | 63.400 | South | — |
| 1,673,136,000,000 | 49.700 | West | — |
| 1,673,222,400,000 | 102.60 | North | — |
| 1,673,222,400,000 | 87.300 | South | — |
| 1,673,222,400,000 | 50.800 | West | — |
| 1,673,308,800,000 | 104.30 | North | — |
| 1,673,308,800,000 | 79.100 | South | — |
| 1,673,308,800,000 | 51.100 | West | — |
| 1,673,395,200,000 | 106.30 | North | — |
| 1,673,395,200,000 | 80.300 | South | — |
| 1,673,395,200,000 | 55.900 | West | — |
| 1,673,481,600,000 | 104.50 | North | — |
| 1,673,481,600,000 | 78.600 | South | — |
| 1,673,481,600,000 | 71.600 | West | — |
| 1,673,568,000,000 | 122.30 | North | — |
| 1,673,568,000,000 | 88.200 | South | — |
| 1,673,568,000,000 | 65.200 | West | — |
| 1,673,654,400,000 | 79.500 | North | — |
| 1,673,654,400,000 | 53.700 | South | — |
| 1,673,654,400,000 | 64.500 | West | — |
| 1,673,740,800,000 | 61.700 | North | — |
| 1,673,740,800,000 | 39.100 | South | — |
| 1,673,740,800,000 | 40 | West | — |
| 1,673,827,200,000 | 101.40 | North | — |
| 1,673,827,200,000 | 81.100 | South | — |
| 1,673,827,200,000 | 57.300 | West | — |
| 1,673,913,600,000 | 99.700 | North | — |
| 1,673,913,600,000 | 88.400 | South | — |
| 1,673,913,600,000 | 54.400 | West | — |
| 1,674,000,000,000 | 106.10 | North | — |
| 1,674,000,000,000 | 87.200 | South | — |
| 1,674,000,000,000 | 71.500 | West | — |
| 1,674,086,400,000 | 113.50 | North | — |
| 1,674,086,400,000 | 68.300 | South | — |
| 1,674,086,400,000 | 59 | West | — |
| 1,674,172,800,000 | 126.70 | North | — |
| 1,674,172,800,000 | 90.100 | South | — |
| 1,674,172,800,000 | 66.800 | West | — |
| 1,674,259,200,000 | 102.30 | North | — |
| 1,674,259,200,000 | 71.100 | South | — |
| 1,674,259,200,000 | 54.100 | West | — |
First 60 of 3276 rows.
Which chart for which pattern?
PredictPredict first
You want to know whether July is usually higher than March, and whether that's changing. Which chart answers this most directly?
Reveal
The answer: Seasonal subseries
A Seasonal subseries puts each month in its own small panel, so you compare Julys with Julys. A plain line can hide this among trend and noise.
View data
| month | passengers_k |
|---|---|
| 1,420,070,400,000 | 169 |
| 1,422,748,800,000 | 153 |
| 1,425,168,000,000 | 184 |
| 1,427,846,400,000 | 184 |
| 1,430,438,400,000 | 177 |
| 1,433,116,800,000 | 211 |
| 1,435,708,800,000 | 234 |
| 1,438,387,200,000 | 219 |
| 1,441,065,600,000 | 190 |
| 1,443,657,600,000 | 174 |
| 1,446,336,000,000 | 157 |
| 1,448,928,000,000 | 179 |
| 1,451,606,400,000 | 169 |
| 1,454,284,800,000 | 167 |
| 1,456,790,400,000 | 202 |
| 1,459,468,800,000 | 190 |
| 1,462,060,800,000 | 191 |
| 1,464,739,200,000 | 217 |
| 1,467,331,200,000 | 244 |
| 1,470,009,600,000 | 246 |
| 1,472,688,000,000 | 218 |
| 1,475,280,000,000 | 184 |
| 1,477,958,400,000 | 165 |
| 1,480,550,400,000 | 178 |
| 1,483,228,800,000 | 184 |
| 1,485,907,200,000 | 178 |
| 1,488,326,400,000 | 200 |
| 1,491,004,800,000 | 199 |
| 1,493,596,800,000 | 200 |
| 1,496,275,200,000 | 226 |
| 1,498,867,200,000 | 250 |
| 1,501,545,600,000 | 247 |
| 1,504,224,000,000 | 232 |
| 1,506,816,000,000 | 198 |
| 1,509,494,400,000 | 168 |
| 1,512,086,400,000 | 192 |
| 1,514,764,800,000 | 193 |
| 1,517,443,200,000 | 182 |
| 1,519,862,400,000 | 231 |
| 1,522,540,800,000 | 204 |
| 1,525,132,800,000 | 202 |
| 1,527,811,200,000 | 242 |
| 1,530,403,200,000 | 269 |
| 1,533,081,600,000 | 270 |
| 1,535,760,000,000 | 238 |
| 1,538,352,000,000 | 203 |
| 1,541,030,400,000 | 184 |
| 1,543,622,400,000 | 201 |
| 1,546,300,800,000 | 207 |
| 1,548,979,200,000 | 204 |
| 1,551,398,400,000 | 240 |
| 1,554,076,800,000 | 227 |
| 1,556,668,800,000 | 213 |
| 1,559,347,200,000 | 255 |
| 1,561,939,200,000 | 294 |
| 1,564,617,600,000 | 283 |
| 1,567,296,000,000 | 252 |
| 1,569,888,000,000 | 233 |
| 1,572,566,400,000 | 195 |
| 1,575,158,400,000 | 222 |
First 60 of 120 rows.
Patterns of many kinds
Read| Chart | Shows |
|---|---|
| Rolling statistics | trend through noise |
| Calendar heatmap | weekday and holiday patterns |
| Weekday × hour heatmap | daily rhythm |
| Lag plot, ACF & PACF | dependence on past values |
| Seasonal decomposition | trend, season and remainder apart |
Break a series apart
ExploreChange the trend, season and noise, and watch the decomposition recover each. Then raise the noise until the season disappears from view.
DExplorable · Compose and decompose a series
How much of a series is trend, how much is season, and how much is noise?
How strong is the seasonality on a 0–1 scale?
The series
Trend
Seasonal
Remainder
Commit your prediction above to see the result
Make your prediction to see the result.
Dual axes
ReadTwo y-axes let you draw any two series on one chart. Their apparent crossings and shared rises depend on how you scale each axis, and those scales are arbitrary.
Try it
In the appIn Charts, open Line chart and choose Use my data on a dated column. Then open Seasonal subseries on the same data, and compare what each one shows you.
Check your understanding
CheckpointCheck yourself
A sensor was off for two weeks. How should a line chart treat that?
Show the answer
Answer: b
A connecting line claims values you never measured, and zeros are false. A gap is the honest picture.
Check yourself
Why are dual-axis line charts risky?
Show the answer
Answer: a
Rescale one axis and the crossings move or vanish. The picture shows your choice as much as the data.
Recap
Recap- Lines imply continuity, so show gaps as gaps.
- Use seasonal plots to compare like with like.
- Avoid dual axes: use panels or an index.