Label line chart series
The chart above contains no legend instead data labels are used to show what each line represents.
Table of Contents
1. How to build
- Insert a line chart.
- To label each line we need a cell range with the same size as the chart source data. Simply copy the chart source data range and paste it to your worksheet, then delete all data.
- All cells are now empty. Copy categories (Regions in this example) and paste to the last column (2018).
Those correspond to the last data points in each series.
- Press with right mouse button on on a data series and select "Add Data Labels".
- Double press with left mouse button on with left mouse button on one of the data labels you just inserted to open the task pane window.
- Select checkbox "Value from cells".
- Select data label cell range we created earlier in step 3 and 4, that corresponds to the same line series. Use the legend to identify line series.
In this example the data labels correspond to "South America", see image below.
- The data labels now show both numerical values and the last text value.
To hide the numerical values simply double press with left mouse button on on the data labels to open the task pane. - Deselect check box "Value".
- All numerical values are now deleted from the data labels, only the last data point has a data label, see image below.
- Position the data label to the right of the data point using the task pane.
- Resize the plot area so the data label doesn't collide with the line.
- Repeat step 4-12 with the remaining line series.
2. How to wrap data label text
- Double press with left mouse button on the cell that contains the data label.
- Put the prompt between the words.
- Press Alt + Enter.
- Press Enter.
3. Align data labels
- If you want the labels to be aligned to the left simply select the data label.
- Go to tab "Home" on the ribbon.
- Press with left mouse button on the "Align Left" button.
Get Excel *.xlsx file
Charts category
Question: How do I create a chart that dynamically adds the values, as i type them on the worksheet? Answer: […]
I recently discovered an interesting technique about using a user defined function in a HYPERLINK function. Jordan at the Option […]
This article demonstrates macros that automatically changes the chart bar colors based on the corresponding cell, the first example is […]
Line chart category
This article demonstrates how to highlight a line in a chart based on the selected item in a drop-down list. […]
This article demonstrates how to create an animation using a line chart in Excel. The user selects a series in […]
The line chart lets you chart data points as a line, this chart type is useful if you have many […]
Excel categories
3 Responses to “Label line chart series”
Leave a Reply
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Thanks for sharing a really useful and cool chart trick.
Oscar: Really appreciate this article on data labels. Well done. I had been tinkering with trying to substitute a letter for the line and this did the trick. (Letters would allow the reader to better identify the data since I was using color for a different purpose and line shape (i.e. dotted) also for a different purpose. Fabulous article. James
James D Russel,
thank you.