How to Plot Dates on the X-Axis in an Excel Line Chart
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.

- 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.
Ensure your date column is formatted as dates and your two dollar-value columns are formatted as currency or numbers before creating the chart.
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.
Select only the two columns containing your dollar values. Go to the Insert tab on the ribbon and select a Line Chart.
Right-click the newly created chart and select 'Select Data' from the context menu.
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'.
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'.
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.

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. Insert Chart: Select your value columns, go to the Insert tab, and choose Line Chart.
- 2. Set X-Axis Labels: Right-click the chart, choose 'Select Data', and edit the Category Axis to select your dates.
- 3. Enable Secondary Axis: Double-click the data series that requires a different scale to open the properties pane, and select 'Secondary Axis'.

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.




