简体   繁体   中英

How to specify x-labels in excel chart as “2019-01”, “2019-02” ,etc?

I have a series of data in excel as follow:

x: [2019-01, 2019-02, 2019-03, 2019-04]

y: [12, 13, 12.7, 13.4]

I want to plot y vs. x so that x labels on x-axis be displayed as "2019-01", "2019-02", etc. How can do this job in excel?

Just format your source data the way you'd like it to appear on the chart. To make the dates appear this way in the cells, format cells > Number format > Custom > then type yyyy-mm in the Type field and click okay. The date formatting of the chart axis should default to match the source data. Here is a snip. If you don't want to change the source data format, then select the axis and in Chart Options > Axis Options > Number > Change the format there.

图表

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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