Show a trend with a line chart
Charts that answer a question8 min
Builds on Make a column or bar chart.
A hotel in Porto tracks its occupancy month by month. The owners want to know whether this year is running ahead of last year, and when the summer peak arrives, and a line chart shows both at a glance.
How it works
A line joins each value to the next, so the eye reads the slope: rising, falling, flat, or a dip that comes back every winter. Put the periods in the first column, as month names or real dates, and a column of numbers for each line, then choose Insert > Insert Line or Area Chart > Line. Two or three lines on one chart compare years or products. Beyond four or five, they tangle.
Real dates give the chart a date axis: Excel spaces the points by time, so a missing month leaves a wider gap instead of closing up. Month names typed as text are labels, spaced evenly whatever they say. Right-click the axis and choose Format Axis to switch between Date axis and Text axis, under Axis Type.
To chart columns that aren't next to each other, select the first block, then hold Ctrl (Cmd on a Mac) and select the second. Both blocks must cover the same rows:
A1:A7, C1:C7. The months label the axis, This year becomes the only line, and Last year stays out.Example
The hotel's occupancy for January to June sits in A1:C7. Select A1:C7 and insert a line chart, and two lines climb toward the summer, this year's above last year's in every month. For this year alone, select A1:A7, hold Ctrl, select C1:C7 and insert the chart again.
Common mistakes
- A line through items with no order, such as stores or products. Use columns or bars.
- A Total row at the bottom of the range. The line shoots up at the end and the months flatten out. Leave it out.
- Dates with gaps on a date axis, such as trading days without weekends. Each weekend shows as a stretch with no points. Switch to a text axis to put each day next to the last.
- Leaving out the headings. The legend then says Series1 and Series2 instead of naming the years.
In short
- A line suits values in order, such as months, where the slope means something.
- Real dates make a date axis spaced by time, and text months are spaced evenly.
- Hold Ctrl, or Cmd on a Mac, to chart columns that aren't next to each other.
Practice
4 exercises · free, no account needed