How to Add a Dynamic Zero Line to an Excel Secondary Axis
Question details
The user needs to display a horizontal zero baseline on a secondary value axis in a chart, ensuring the line automatically adjusts if the axis scale changes.
- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Creating a dual-axis chart where the secondary axis values include both positive and negative numbers, requiring a clear zero baseline indicator.
- Observed behavior
- Excel does not automatically display a horizontal zero line for the secondary axis, making it difficult to visually interpret the baseline for secondary data points.
Ensure your chart already has a secondary axis configured and note the number of categories (data points) on your horizontal axis so you can create a matching helper data series.
Create a Dynamic Zero Line Using a Helper Data Series
This is the most reliable method for adding a zero line. By plotting a dummy data series of zero values on the secondary axis, the line will dynamically adjust anytime the axis scale recalculates.
A helper series acts as an anchor for your baseline. Because its values are all exactly zero and it is plotted directly onto the secondary axis, Excel will naturally draw it at the zero mark of that specific axis, regardless of how the data changes or how the axis rescales.
In your spreadsheet, add a new column next to your source data. Name it 'Zero Line' and fill the cells with the number 0 for every category in your chart.
Right-click anywhere on your existing chart and choose 'Select Data'. Click the 'Add' button under 'Legend Entries (Series)', name the series 'Zero Line', and select the range of zeros you just created as the series values.
Right-click the newly added zero series on the chart and click 'Format Data Series'. In the task pane, under 'Series Options', check the radio button for 'Secondary Axis'.
Right-click the zero series again and choose 'Change Series Chart Type'. Locate the 'Zero Line' series in the list and change its chart type to 'Line' (without markers).
Select the new line, go to the 'Format' tab, and use 'Shape Outline' to change its color, thickness, or dash style so it resembles a standard axis baseline.
Easily Manage Dual-Axis Charts with WPS Spreadsheet
WPS Spreadsheet provides highly intuitive charting tools that make handling secondary axes and formatting baseline values effortless. You can achieve professional visualizations quickly while enjoying seamless cross-platform compatibility.
- 1. Insert your dual-axis chart: Open your dataset in WPS Spreadsheet, select your data, go to the 'Insert' tab, and create your combination chart with a secondary axis.
- 2. Add a zero-value helper column: Type '0' into a new column adjacent to your data, filling it down to match the number of rows in your chart categories.
- 3. Add the series to the chart: Right-click the chart, choose 'Select Data', and add your new column of zeros as a new data series.
- 4. Assign to secondary axis and format: Double-click the new series to open the properties pane on the right, set it to 'Secondary Axis', and change its chart type to a 'Line' to form your dynamic baseline.

Frequently Asked Questions
Why doesn't Excel show a zero line for the secondary axis by default?
Excel calculates the minimum and maximum bounds of the primary and secondary axes independently based on their respective data ranges. Because the scales are independent, the zero points rarely align naturally, and Excel refrains from drawing an extra default line to prevent visual clutter.
Can I just draw a line shape over the chart instead of using a helper series?
While you can insert a line shape via the Insert tab, it is not dynamic. If your data changes, your chart resizes, or the secondary axis rescales, the drawn line will remain in its original position and inaccurately represent the zero mark.
How do I align the primary and secondary axis zero points?
To perfectly align the zero lines, you must manually adjust the axis bounds for both axes. Right-click an axis, select 'Format Axis', and set the Minimum and Maximum bounds so that the ratio of max-to-min is identical for both the primary and secondary axis.




