In this Excel charting tutorial, you will learn how to add a horizontal line to a graph. Inserting a horizontal line into a chart is very possible.
But, first we need a chart that looks like this:
1. Add a new label to the data (1), and click on the cell under it to type =average(all the data with value) (2).
Note: This step is just a possible way to inform Excel what information to use for the line. You should repeat this step on all the remaining cells to match the rows of the remaining columns.
Horizontal line adding
2. Right click on any of the series, and choose select data.
3. Click add
4. Choose the cell for series’ name (1), and cells for the values (2). Then click ok.
5. Press ok again.
6. Right click on any of the average series (1), and choose change chart (2).
7. On the chart type, change the chart to line. Now, click ok.
The final result would look something like this:
Horizontal line formatting
The next step is to add a description of the horizontal line. Go to the Ribbon and add data labels.
Click on your horizontal line and select Ribbon > Design > Add Chart Element > Data Labels> Center.
Data labels will appear. Delete all with the Delete key except one. Enter a description of the horizontal line and format the font.
This is how to add a horizontal line to a chart.
An alternative method
Here’s an alternative method to add a horizontal line to a chart in Excel:
- Select the data series that you want to add the horizontal line to.
- Right-click on the data series, and select “Format Data Series” from the menu that appears.
- In the “Format Data Series” pane that appears on the right-hand side of the screen, select “Line” from the “Series Options” section.
- Set the “Dash Type” to “Solid”, and set the “Width” to the desired thickness for your line.
- Scroll down to the “Marker Options” section, and select “None” for both the “Type” and “Size” options.
- Under the “Values” section, click on the “Add” button next to the “Y values” field.
- In the “Edit Series” window that appears, enter the value where you want to draw the horizontal line in the “Y Value” field. For example, if you want a line at y=50, enter “50”.
- Click “OK” to close the “Edit Series” window, and then click “Close” to close the “Format Data Series” pane.
Your chart should now include a horizontal line at the specified value.