Chart & Visualization Issues

How to Add a Reference Line to an Excel Chart (Fixed & Dynamic)

Steven ParkerSteven Parker Nov 10, 2026 870 views

Question details

The user wants to add a horizontal reference line and a corresponding value to an Excel chart, either as a static shape or as a dynamic chart series.

How to Add a Reference Line to an Excel Chart
Product
Excel
Device & OS
not provided
Scenario
Visualizing data against a specific benchmark, average, or target value in a chart.
Observed behavior
A need to display a distinct reference line on an existing chart to compare data points against a fixed or updating target.
Before you start

Ensure your chart is fully set up with your base data before adding a reference line. If you plan to use a data-driven line, determine the exact target or average value you want to benchmark against.

Solution 1Recommended

Create a Data-Driven Reference Line (Dynamic)

This is the most reliable approach if your target value might change or your chart scale updates frequently, as the line adjusts automatically.

By utilizing a helper column and converting it into a secondary line series, you can create a dynamic reference line that stays perfectly aligned with the vertical axis regardless of how the underlying data changes.

1
Create a Helper Column

Next to your original chart data in the worksheet, create a new column named 'Target' or 'Reference'.

2
Input the Target Value

Enter your desired reference value (e.g., 500) in the first cell of the new column and fill it down to match every category row.

3
Add Series to Chart

Right-click the existing chart, choose 'Select Data', click 'Add', and select the new Target column as the new series values.

4
Change Chart Type

Right-click the newly added series (often appearing as new bars on the chart), select 'Change Series Chart Type', and change the specific target series to a 'Line' chart.

Create a Data-Driven Reference Line (Dynamic)
Adding Data Labels: To show the value of your line, right-click the line, choose 'Add Data Labels', and then delete all but the last label so it displays neatly at the end of the line.
Powerful Charting Tool

Easily Add Dynamic Reference Lines with WPS Spreadsheet

WPS Spreadsheet provides robust, easy-to-use charting tools that make adding target lines, benchmark markers, and dynamic combination charts incredibly simple. Enjoy professional data visualization with perfect format compatibility.

  1. 1. Prepare Data: Open your workbook in WPS Spreadsheet, select your base data, and add a helper column for your reference value.
  2. 2. Insert the Base Chart: Go to the 'Insert' tab and create your base column or bar chart.
  3. 3. Add Target Series: Copy your helper column data, click on the chart, and press Ctrl+V to paste the new series directly into the chart.
  4. 4. Format as Line: Right-click the new series, select 'Change Series Chart Type', and choose 'Line' to complete your reference line.
Advanced charting features for professional data visualization.100% format compatibility with Microsoft Excel (.xlsx) files.Intuitive interface for creating combination charts and secondary axes.Free, lightweight, and runs smoothly on Windows, Mac, and Linux.
microsoft office alternative - wps office

Frequently Asked Questions

How do I add an average reference line to an Excel chart?

You can calculate the average of your data using the =AVERAGE() function in a helper column. Fill this calculated average down the entire column, add it to your chart as a new series, and change its type to a Line chart. It will automatically update if your base data changes.

Why does my reference line disappear or misalign when I add new data?

If you used a static inserted shape, adding new data might change the scale of your vertical axis, making the shape visually misaligned. For a dynamic data-driven chart, ensure your helper column formula extends to include the new data rows and that your chart's data range has been updated.

Can I add a vertical reference line to a bar chart?

Yes, the process is similar but applied to the horizontal axis. For a data-driven vertical line, you typically use an X Y (Scatter) chart series combined with X Error Bars, or you can simply draw a vertical static shape line over your bar chart.

Is it possible to shade the area below my reference line?

Yes. Instead of using a 'Line' chart type for your reference series, use an 'Area' chart type. This will fill the space below your target value with a solid color, creating a benchmark zone on your chart.