logo
search
Chart & Visualization Issues

How to Change the Horizontal Data Range in an Excel Chart

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

The user needs to adjust the horizontal (X-axis) data range for an Excel chart, which varies depending on the chart type.

Product
Microsoft Excel
Device & OS
not provided
Scenario
Customizing the chart's data source to correctly display horizontal category labels or X-axis values.
Observed behavior
The current horizontal axis data needs updating, requiring different steps for category-based charts versus value-based scatter charts.
Before you start

Identify the type of chart you are working with (e.g., Column, Bar, Line, or XY Scatter), as the steps for editing category labels versus numeric X-values differ slightly.

Solution 1Recommended

Change Horizontal Axis Labels for Column, Bar, and Line Charts

Use the Select Data Source dialog box to quickly update category labels for standard charts.

Column, bar, and line charts use text-based category labels for their horizontal axis. Modifying this range will update the names appearing under each data point or bar.

1
Select the chart

Click anywhere on your chart to highlight it and reveal the Chart Design tab on the ribbon.

2
Open the Select Data dialog

Navigate to the 'Chart Design' tab and click on the 'Select Data' button.

3
Edit the horizontal axis labels

In the 'Select Data Source' dialog box, look at the right pane titled 'Horizontal (Category) Axis Labels' and click the 'Edit' button.

4
Select the new range

Highlight the new range of cells in your worksheet that contain the updated labels, then click 'OK' twice to apply the changes.

Efficient Spreadsheet Data Visualization

Easily Manage Chart Data with WPS Spreadsheet

WPS Office provides an intuitive and free alternative for creating and editing charts. You can seamlessly adjust data ranges, format axes, and customize chart elements with complete Microsoft Excel compatibility.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open your existing Excel workbook.
  2. 2. Select the chart: Click on the chart to activate the 'Chart Tools' contextual menu.
  3. 3. Access data settings: Click the 'Select Data' icon located on the top ribbon.
  4. 4. Edit horizontal range: Edit the 'Category (X) axis labels' or 'Series X values' depending on your chart type by highlighting the new data range.
  5. 5. Apply changes: Click 'OK' to instantly apply the updated horizontal data range to your chart.
Fully compatible with Microsoft Excel (.xlsx) formats and chart types.Intuitive 'Select Data' interface for quick axis and series adjustments.Lightweight software that loads large datasets faster without lagging.Free to use with comprehensive data visualization tools.
microsoft office alternative - wps office

Frequently Asked Questions

Why is the 'Edit' button under Horizontal Axis Labels grayed out?

If the 'Edit' button is grayed out, you are likely working with an XY Scatter or Bubble chart. For these chart types, the horizontal axis relies on the 'Series X values', which must be modified by editing the series directly on the left side of the Select Data dialog.

Can I type the horizontal data range manually instead of selecting cells?

Yes, in the Axis Labels or Series X values box, you can manually type the absolute range reference (e.g., =Sheet1!$A$2:$A$10) or enter a comma-separated array of values enclosed in curly brackets.

How do I fix blank spaces on my chart's horizontal axis?

Blank spaces usually occur if your selected horizontal data range includes empty cells. Go to 'Select Data', edit the horizontal axis labels, and ensure the newly selected range exactly matches your populated data rows.

What is the difference between category labels and X-values?

Category labels (used in column, bar, and line charts) treat the horizontal axis as text groupings, placing data points evenly spaced apart. X-values (used in scatter charts) plot data according to numeric scales, reflecting precise mathematical positions.