简体   繁体   English

如何在Excel图表中更改主要网格线的起点?

[英]How to change start point of Major Gridlines in an excel chart?

I have a chart that has data starting in September 2011 until April 2019 (monthly data). 我有一个图表,该图表的数据从2011年9月开始到2019年4月(每月数据)。 I have plotted it on a chart and put the year of the data on the x axis. 我已将其绘制在图表上,并将数据的年份放在x轴上。 The cosmetic issue I have is that the first text label on the x axis ("2012") is shown nearly half way through the first 'major gridline' point. 我遇到的装饰性问题是,x轴上的第一个文本标签(“ 2012”)显示在第一个“主要网格线”点的近一半处。

What I want is for each year to line up with each 'major gridline'. 我想要的是每年与每个“主要网格线”对齐。 This would involve starting the first major gridline 5 data points in - not 12 as I have as standard. 这将涉及从第一个主要网格线中的5个数据点开始-而不是我通常的12个数据点。 For the life of me I cannot work out how to change this. 对于我的一生,我无法解决如何改变这一点。

I know I can change the data so that my x axis "starts" at 2011. The issue with this is that the value points that are unavailable (Jan-11 to Aug-11) are set at 0 and therefore mess up the trendline. 我知道我可以更改数据,以使我的x轴在2011年“开始”。问题在于,不可用的值点(从1月11日到11月11日)设置为0,因此弄乱了趋势线。

Any suggestions? 有什么建议么?

Thank you. 谢谢。

图表示例

So, just to prove my comment of a dummy data line and added a trendline to each with the formula shown - which happens to have the same values. 因此,为了证明我对虚拟数据线的评论,并使用所示公式向每条趋势线添加了一条趋势线-碰巧具有相同的值。

在此处输入图片说明

Did you try as below? 您是否尝试过以下方法?

在此处输入图片说明

I'm thinking just add the missing months to the graph's data and have empty values. 我在想只是将缺少的月份添加到图形的数据中,并具有空值。 Empty values don't seem to affect your trendline. 空值似乎不会影响您的趋势线。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM