Chart & Visualization Issues

Change an Excel Chart Horizontal Axis to Display Years

Steven ParkerSteven Parker Nov 12, 2026 872 views

Question details

Configure an Excel chart so its horizontal axis displays values from a Year column.

Change an Excel Chart Horizontal Axis to Display Years
Product
Microsoft Excel chart
Device & OS
not provided
Scenario
The user wants the chart category axis to use year values from the source data, including when working in Excel for Mac.
Observed behavior
The horizontal axis is not currently showing the intended year labels or year-based scale.
Before you start

Make sure the Year column contains valid year values, such as 2021, 2022, and 2023, with no blank cells in the charted range. Select the chart first so that the Chart Design and Format Axis controls are available.

Solution 1Recommended

Assign the Year column as the chart’s horizontal axis labels

Use this method for column, bar, line, and area charts when the wrong category labels appear on the horizontal axis.

For category-based charts, the horizontal axis labels are controlled in the Select Data dialog. Point the Horizontal (Category) Axis Labels field to the cells containing the years.

1
Open Select Data

Click the chart, then select Chart Design > Select Data. In Excel for Mac, click the chart and choose Chart Design > Select Data.

2
Edit the horizontal axis labels

Under Horizontal (Category) Axis Labels, click Edit, select the cells in the Year column only, and click OK.

3
Confirm the chart range

In the Select Data Source window, verify that each series uses the correct numeric value range and that the Year column is not accidentally included as a data series. Click OK to apply the changes.

Assign the Year column as the chart’s horizontal axis labels
Year labels assigned: The horizontal axis should now display the selected years in the same order as they appear in the source range.
Create and format charts with WPS Office

Set a Year Column as the Horizontal Axis in WPS Spreadsheets

WPS Spreadsheets lets you choose the Year column for chart category labels and adjust axis type and number formatting from the chart tools. Import an Excel workbook, update the chart, and keep the workbook in its original Excel format.

  1. 1. Open the workbook in WPS Spreadsheets: Open the Excel workbook in WPS Office and click the chart that needs year labels.
  2. 2. Select the chart data source: Go to Chart Tools > Select Data, then locate the Horizontal (Category) Axis Labels section.
  3. 3. Choose the Year cells: Click Edit, select the Year column cells from the worksheet, and confirm with OK.
  4. 4. Format the horizontal axis: Right-click the horizontal axis, choose Format Axis, and set the axis type and number format, such as yyyy for date values.
Assign a Year column to line, column, bar, and area chart horizontal axesFormat date-based axes with a yyyy display formatOpen, edit, and save Microsoft Excel .xlsx and .xls filesUse a familiar spreadsheet and chart editing interface
QA img-9

Frequently Asked Questions

Why does my Excel chart show numbers instead of years on the horizontal axis?

The chart may be using default category numbers or the wrong label range. Select the chart, go to Chart Design > Select Data, and set Horizontal (Category) Axis Labels to the cells containing the years.

Should I use a Text axis or a Date axis for years in Excel?

Use a Text axis when the source is a simple list such as 2020, 2021, and 2022. Use a Date axis when the source cells contain real dates and you want spacing based on chronological intervals.

How do I change horizontal axis labels in Excel for Mac?

Click the chart, select Chart Design > Select Data, then click Edit beside Horizontal (Category) Axis Labels. Select the Year column cells and click OK.

Why are my years appearing as full dates on the chart axis?

The source values are likely stored as dates. Control-click the axis, select Format Axis, expand Number, and apply the custom format yyyy.

How do I set years as X values in an Excel scatter chart?

For an XY (Scatter) chart, open Chart Design > Select Data, select a series, and click Edit. Set the Series X values to the Year column; scatter charts do not use the category-axis-label setting.