How do I create a multiple line chart using data with inconsistent dates?

I'm creating a chart using data collected over several years. The date the data is collected is the X-Axis, but the dates do not line up. For some reason, the table is resetting along the x-axis and the data points are not lining up correctly with the X-axis. The data is sourced from tables in multiple tabs, but all in the same document. Each tab is it's own year. What am I doing wrong?


The attached image is a composite I made, showing the chart and then showing a screenshot of each table the data is sourced from, call copied and pasted into a single image.



[Edited by Moderator]

MacBook Pro 14″, macOS 15.6

Posted on Sep 12, 2025 3:01 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 12, 2025 5:06 PM

There are a few things going on here.


First is that the line chart you are using is a "category" chart. The "dates" are just text and they will be placed evenly spaced across the X axis regardless of the values. The scatter chart is the only true X-Y chart where the X data must be numeric (numbers or dates or whatever) and it will be treated as such.


Second, you need to get it all into one table, then make a scatter chart. Actually, if you are plotting just the one row of each table (well, two rows technically with X = the dates and Y = the first row) you could make it from multiple tables and then deselect "share X values". It won't work if you plot more than the one row. Note that all X and Y data needs to be in data cells for a scatter chart, none in headers. The line chart and other category charts expect the X "data" in the header. So you'll have to set header rows to 0.


The wonkiness you are seeing with the chart is because your data for the line chart is in multiple tables. The first table you chose has three dates in the header row and the chart gets its first three categories from that. When you select the next table to include its data, the chart ignores the first three dates in that table because it already has the first three category names. It picks up one more date/category from the last column of the table. With the next table it ignores the first 4 dates because it has 4 categories already then picks up a few more in the rightmost columns. In the last two tables it doesn't use any of the dates because it already has enough. Then it plots the data. Column B of all tables is plotted as the 1st category, Column C of all tables is the 2nd category, and so on.


1 reply
Question marked as Top-ranking reply

Sep 12, 2025 5:06 PM in response to Mattj123321

There are a few things going on here.


First is that the line chart you are using is a "category" chart. The "dates" are just text and they will be placed evenly spaced across the X axis regardless of the values. The scatter chart is the only true X-Y chart where the X data must be numeric (numbers or dates or whatever) and it will be treated as such.


Second, you need to get it all into one table, then make a scatter chart. Actually, if you are plotting just the one row of each table (well, two rows technically with X = the dates and Y = the first row) you could make it from multiple tables and then deselect "share X values". It won't work if you plot more than the one row. Note that all X and Y data needs to be in data cells for a scatter chart, none in headers. The line chart and other category charts expect the X "data" in the header. So you'll have to set header rows to 0.


The wonkiness you are seeing with the chart is because your data for the line chart is in multiple tables. The first table you chose has three dates in the header row and the chart gets its first three categories from that. When you select the next table to include its data, the chart ignores the first three dates in that table because it already has the first three category names. It picks up one more date/category from the last column of the table. With the next table it ignores the first 4 dates because it has 4 categories already then picks up a few more in the rightmost columns. In the last two tables it doesn't use any of the dates because it already has enough. Then it plots the data. Column B of all tables is plotted as the 1st category, Column C of all tables is the 2nd category, and so on.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I create a multiple line chart using data with inconsistent dates?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.