logo
search
Chart & Visualization Issues

How to Plot Dates on the X-Axis in an Excel Line Chart

Elise WilliamsElise Williams Oct 10, 2026 869 views

Question details

The user needs to plot two dollar-value series with different scales over time, ensuring dates appear correctly on the X-axis in a line chart.

How to Plot Dates on the X-Axis in an Excel Line Chart
Product
Excel
Device & OS
not provided
Scenario
Creating a dual-axis line chart to compare two distinct financial data series over time.
Observed behavior
Dates must act as horizontal axis labels rather than an additional data series, and the distinct scales must be visually accommodated.
Before you start

Ensure your date column is formatted as dates and your two dollar-value columns are formatted as currency or numbers before creating the chart.

Solution 1Recommended

Set Dates as Horizontal Axis Labels and Add a Secondary Axis

Use this method to correctly assign a date column to the X-axis and handle two data series with different scales to avoid a skewed chart.

When plotting financial data over time, Excel sometimes mistakenly interprets date columns as a standard numeric data series. To fix this, you need to manually assign the dates to the horizontal axis.

Additionally, if your two dollar-value series have vastly different ranges (e.g., one in hundreds and the other in millions), adding a secondary axis ensures both lines are clearly visible.

1
Insert the Line Chart

Select only the two columns containing your dollar values. Go to the Insert tab on the ribbon and select a Line Chart.

2
Open Data Selection

Right-click the newly created chart and select 'Select Data' from the context menu.

3
Assign Dates to the X-Axis

In the Select Data Source dialog, look for the 'Horizontal (Category) Axis Labels' section. Click 'Edit', highlight your date column in the worksheet, and click 'OK'.

4
Format Data Series

To handle the different scales, right-click the line on the chart that represents the series with the vastly different scale and choose 'Format Data Series'.

5
Enable Secondary Axis

In the Format Data Series pane that appears on the right, look under Series Options and select 'Secondary Axis'. This will add a second vertical scale to the right side of the chart.

Set Dates as Horizontal Axis Labels and Add a Secondary Axis
Avoid Dates as Data: Make sure you do not select the date column as one of the primary data series when initially creating the chart, as Excel might mistakenly plot it as a line.
WPS Spreadsheet Solution

Create Dual-Axis Line Charts Easily in WPS Office

WPS Spreadsheet provides an intuitive interface for managing chart data, seamlessly setting X-axis labels, and adding secondary axes for comparing values with different scales.

  1. 1. Insert Chart: Select your value columns, go to the Insert tab, and choose Line Chart.
  2. 2. Set X-Axis Labels: Right-click the chart, choose 'Select Data', and edit the Category Axis to select your dates.
  3. 3. Enable Secondary Axis: Double-click the data series that requires a different scale to open the properties pane, and select 'Secondary Axis'.
Easily plot dates on the X-axis using the intuitive Select Data tool.Fully compatible with Microsoft Excel (.xlsx) chart formats and data structures.Quickly add a secondary axis for multi-scale financial data in just two clicks.Completely free and lightweight office suite for daily data visualization tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why is Excel plotting my dates as a line instead of X-axis labels?

This happens if you include the date column in your initial selection when inserting the chart. To fix this, right-click the chart, choose Select Data, remove the date series from the Legend Entries (Series) box, and add it to the Horizontal (Category) Axis Labels box.

How do I format the dates on the X-axis to show only month and year?

Right-click the X-axis on your chart, select Format Axis, and navigate to the Number section at the bottom of the pane. Enter a custom format code like 'mmm-yyyy' in the Format Code box and click Add.

Can I add a secondary axis in Excel without right-clicking?

Yes, you can go to the Chart Design tab, click Change Chart Type, select Combo from the left sidebar, and check the 'Secondary Axis' box next to the data series you want to display on the second scale.