Google Sheets 折线图:调整水平轴范围以排除缺失的单元格

Google Sheets Line Chart: adjust horizontal axis limits to exclude missing cells

我注意到即使缺少相应的 Y 值,水平轴也适合 X 值。 有没有办法自动调整水平轴范围以排除缺失的单元格?

https://docs.google.com/spreadsheets/d/1X3BhDyideX-7kyJ9Y-7xvV1naAwWd9eDPfPy3pP94Ic/edit?usp=sharing(sheet“水平轴限制”)

谢谢。

使用数据 > 过滤器 隐藏空白行。它们将自动被排除在图表之外。

或者,创建一个省略空格的新数据 table,如下所示:

=query(A1:B, "where B is not null", 1)

然后将图表的数据范围设置为新的table。