Chart & Visualization Issues

How to Plot Two Data Columns as One Continuous Line in Excel

Huma Ashraf ChHuma Ashraf Ch Nov 11, 2026 870 views

Question details

The user needs to plot paired initial and final values from the same row into a single continuous line chart.

How to Plot Two Data Columns as One Continuous Line in Excel
Product
Excel
Device & OS
not provided
Scenario
Creating a dynamic continuous line chart from horizontal paired data (such as initial and final capacity values) that automatically updates when new table rows are added.
Observed behavior
Excel line charts require data to be in a single vertical series to plot continuously, so horizontal pairs plotted directly will appear as separate series or broken lines rather than a continuous trend.
Before you start

Ensure your original dataset is formatted as an official Excel Table so that dynamic array formulas can automatically detect and include new rows when they are added.

Solution 1Recommended

Reshape Data Using Dynamic Array Formulas and Named Ranges

Use the TOCOL and HSTACK functions to convert horizontal data pairs into vertical columns, then feed them into the chart using dynamic Named Ranges.

To make a line chart continuous, the X and Y coordinates must be stacked vertically. Using Excel's dynamic array functions allows you to restructure the data without manually copying and pasting.

By defining Named Ranges with the spill operator (#), your chart will dynamically scale its axis whenever new data points are added to the original table.

1
Format Original Data as a Table

Select your entire dataset, go to the Insert tab, and click Table (or press Ctrl+T). In the Table Design tab, rename the table to 'Data'.

2
Create Vertical Helper Columns

On a new worksheet named 'Plot data', enter the formula =TOCOL(HSTACK(Data[Date],Data[Date])) in cell A2 to create the vertical X-axis dates. In cell B2, enter =TOCOL(Data[[SCi]:[SCf]]) to stack the paired initial and final Y-axis values.

3
Define Named Ranges for the Spill Arrays

Navigate to Formulas > Name Manager and click New. Create a name called 'Plot_Year' and set its reference to ='Plot data'!$A$2#. Create another name called 'Plot_SpecCapacity' referring to ='Plot data'!$B$2#.

4
Insert and Configure the Line Chart

Go to Insert > Line Chart to insert a blank chart. Right-click it, select 'Select Data', and add a new series. Set the Series X values to ='Plot data'!Plot_Year and the Y values to ='Plot data'!Plot_SpecCapacity.

Reshape Data Using Dynamic Array Formulas and Named Ranges
Dynamic Updates: Because the chart is powered by spill range names, it will automatically update its plotted line as soon as you type new data into the original 'Data' table.
Advanced Data Visualization

Easily Reshape Data and Create Continuous Charts in WPS Spreadsheet

WPS Spreadsheet fully supports dynamic array formulas and advanced charting, allowing you to seamlessly transform complex row data into beautiful continuous line charts without compatibility issues.

  1. 1. Open Your Dataset: Launch WPS Spreadsheet and open the workbook containing your paired row data.
  2. 2. Apply Dynamic Array Formulas: Use the TOCOL and HSTACK functions in a blank column to seamlessly stack your horizontal pairs vertically.
  3. 3. Select the Reshaped Data: Highlight your newly generated vertical X and Y columns.
  4. 4. Insert the Line Chart: Navigate to the Insert tab, click on Chart, select Line Chart, and customize the layout directly from the right-side properties panel.
Fully compatible with Microsoft Excel (.xlsx) file formats and functions like TOCOL and HSTACKIntuitive chart builder with advanced formatting and styling optionsFree to use, lightweight, and perfect for organizing complex datasets
microsoft office alternative - wps office

Frequently Asked Questions

Why does my line chart show two separate lines instead of one continuous line?

By default, spreadsheet software creates a separate data series for each column. To plot them as a single continuous line, you must restructure the paired data points from horizontal columns into a single vertical column before inserting the chart.

What is the purpose of the TOCOL function in this scenario?

The TOCOL function transforms an array or a multi-column range into a single vertical column. In this case, it takes the horizontal initial and final values on each row and stacks them sequentially into one continuous vertical list for accurate plotting.

Why do I need to use the '#' symbol when defining Named Ranges?

The '#' symbol is the spill range operator. It tells the Named Manager to refer to the entire dynamically generated array of data starting from that cell, ensuring your chart's data source automatically expands or shrinks when the original table changes.