How to Add a Reference Line to an Excel Chart (Fixed & Dynamic)
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.

- 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.
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.
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.
Next to your original chart data in the worksheet, create a new column named 'Target' or 'Reference'.
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.
Right-click the existing chart, choose 'Select Data', click 'Add', and select the new Target column as the new series values.
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.

Insert a Fixed Shape Line (Static)
Use this quick method if your reference value is permanent and the chart data is unlikely to change the axis scale.
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. Prepare Data: Open your workbook in WPS Spreadsheet, select your base data, and add a helper column for your reference value.
- 2. Insert the Base Chart: Go to the 'Insert' tab and create your base column or bar chart.
- 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. Format as Line: Right-click the new series, select 'Change Series Chart Type', and choose 'Line' to complete your reference line.

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.




