Sub topic 7
Building a Line Chart
This chapter assumes you can select ranges, use the Insert tab, and know what series and categories are (covered in earlier chapters). A line chart shows how a value changes across an ordered sequence, most often time.
When a line chart fits
A line chart connects points in order. The slope between points shows the direction and speed of change. Use it when the category axis has a natural order, such as months, quarters, or years. If the categories have no order, such as regions, a column chart is the better choice.
Lay out the data
Put the ordered values in the first column and one series per additional column. Excel treats the first column as the category labels and each other column as a series.
Month North South
Jan 120 95
Feb 135 100
Mar 128 110
Apr 150 118
May 162 125Keep the header row, and leave the top-left cell either filled or blank. Do not leave blank rows inside the range.
Insert the chart
- Select the whole range, including headers, for example A1:C6.
- Open the Insert tab.
- In the Charts group, open the line chart menu.
- Choose Line with Markers.
Excel places the chart on the sheet with two lines, one for North and one for South, and a legend that names them.
Line chart variants
| Variant | Use it when |
|---|---|
| Line | You have many points and markers would clutter the chart |
| Line with Markers | You have few points and want each value visible |
| Stacked Line | You want cumulative totals, but it is hard to read, so use it rarely |
Common errors
- Years plotted as a line. If your category column holds years as numbers, such as 2022 and 2023, Excel may treat them as a series. Fix this in Select Data by moving the year column to the horizontal axis labels. Storing the years as text also works.
- Gaps in the line. Empty cells break the line. Right-click the chart, choose Select Data, then Hidden and Empty Cells, and pick Connect data points with line if that suits your data.
- Uneven dates. If the categories are dates, Excel may use a date axis that spaces points by real time. This is usually correct. To space points evenly, set Axis Type to Text axis in Format Axis.
- Too many lines. More than four or five lines become hard to follow. Split them into separate charts.
Exercise
Exercise
You build a line chart from a table with Year (2021, 2022, 2023) in column A and Revenue in column B. Excel draws two lines, one named Year and one named Revenue, and the horizontal axis shows 1, 2, 3. What caused this, and how do you fix it?
Show answer
Excel read the numeric Year column as a data series instead of as category labels. Open Select Data, remove the Year series, then edit Horizontal (Category) Axis Labels and select the year cells A2:A4. Alternatively, store the years as text, or leave cell A1 blank so Excel treats the first column as labels.