如何在Google Sheets折线图中用直线连接缺失数据点?
How to Connect Missing Data Points in Google Sheets Line Charts
Got it, let's get that broken line in your line chart fixed. There are two straightforward ways to handle missing data points—pick the one that fits what you need:
Option 1: Connect Gaps Directly in Chart Settings (No Data Editing Required)
This is the quickest fix if you just want the line to stay connected without altering your raw spreadsheet data:
- Select your line chart, then click the three-dot menu in the top right corner and choose Edit chart.
- In the chart editor panel that pops up, switch to the Customize tab.
- Scroll down to the Line section and expand it.
- Look for the Missing values dropdown (it’s set to "Leave gaps" by default). Change this to Connect data points.
- Done! Your chart will now draw straight lines between existing points, skipping over empty cells without breaking the line.
Option 2: Fill Missing Values with Formulas (For Estimated Data)
If you want to populate empty cells with interpolated values (so your dataset has no gaps), use linear interpolation with the FORECAST.LINEAR function. Let’s assume your dates are in column A and values are in column B:
- In the first empty cell in column B (e.g., B3), enter this formula:
=FORECAST.LINEAR(A3, FILTER($B$1:$B$10, $A$1:$A$10<>""), FILTER($A$1:$A$10, $A$1:$A$10<>"")) - Drag the fill handle down to apply this formula to all empty cells. This calculates a linear estimate based on the nearest existing data points.
- Once all gaps are filled, your line chart will automatically connect every point without breaks.
Either method works great—start with Option 1 if you just need a continuous chart without touching your raw data!
内容的提问来源于stack exchange,提问作者Andrey Kazak
相关产品推荐
相关产品推荐

