Date on X axis of Numbers 2D Scatter Chart - possible?

I see a million variations of the question, no satisfying answers. Thought I'd try again. This is Numbers 14.3 on macOS 15.3.2 - both latest as of when I write this.


I've got data in one table in Numbers. 6-7 values related to workouts, workout date as the key thing I want to graph by - X axis. I've got some gaps (COVID) so I want actual date X values, not just spread uniformly along X axis with date labels - I want the gaps to show.


I can make something like this happen using YEARFRAC(firstdate,rowdate,1) to generate a numeric column that boils the row's date into a numeric value. Use that as series X value. But I don't want to do that extra step. Plus it results in X axis labels being some relative number vs a readable yyyy-mm-dd date.


I've ensured the date column isn't a header column, that was a recommendation somewhere.


I've seen answers indicating that a 2D Scatter chart can have date on X axis if you just Do It All Right(tm) but I can't seem to figure out all the right things to do.


1) Working 2D Scatter version with my "datenum" column via YEARFRAC.




2) Totally broken 2D Scatter version using the actual date column. To the best of my ability set up identically but totally broken. Not showing anything, seems Numbers totally gave up trying?




I can accomplish this in 5 minutes on LibreOffice calc. In a former life I did this a dozen times/week in Excel. This is a thing spreadsheet apps can do.

Posted on Mar 22, 2025 8:51 AM

Reply
6 replies
Sort By: 

Mar 22, 2025 1:19 PM in response to jmaline

I think you're over-complicating things.


By default, if you have a date column in your data, Numbers will use that for the axis and show dates accordingly, spanning the earliest and latest dates.


As a test, I created a simple table with just two columns - Column A for 'date' (formatted as Date & Time) and column B for 'Duration Min (formatted as Automatic).

I filled column A with sequential dates, and added random numbers to column B.


Now, I selected the table, selected columns A and B from the header bar:



Then clicked the Chart button in the tab bar and selected a 2D Scatter Chart. This is what I got:




Sure, my swim times are all over the place, but that's not the point :) the point is that the X axis automatically picked up the dates from the table.


Note the Series formatting. The X Value is set to 'Date' (my column A), and Y Value is set to Duration Min (Column B), with the name coming from the header row.


If that's not what's happening for you then there's likely something amiss with your source data. Can you post more details of what else is in that table?

Reply

Mar 22, 2025 8:58 AM in response to jmaline

Example from LibreOffice calc. Happens to have a couple other series in the graph but you get the idea of what I'm wanting out of Numbers. Didn't have to jump through any hoops, just specify the date column as the first when defining the scatter chart there.


Reply

Mar 22, 2025 3:02 PM in response to Camelot

Thanks for the detailed response (and you too @yellowbox). I've now got a good 2D scatter chart with correctly-working date data on the X axis. Yes it's possible, to answer my question.


The data needed a bit of attention. I was tricked by the fact that yearfrac() in my bogus little test processed it OK so I assumed it was well-formatted date data. It was originally sourced from a CSV import and seems not to have landed quite right.


I selected the date column and explicitly gave it Date & Time format and that seems to have resolved the problem. My formerly-broken chart suddenly displayed as expected without any other changes.



P.S. Sorry for the humblebrag. I should have made the data a bit more generic for my question. I can't make a chart but hey everyone look at my swimming progression! :-)


Reply

Mar 23, 2025 2:57 AM in response to jmaline

That's a lot of time in the water!


In case you haven't seen it, have a look at the 'Running Log' template at File > New in the menu. It incorporates pace.


You can have Numbers track not just how many minutes you are in the water but how fast you are swimming those distances!


SG

Reply

Mar 23, 2025 2:25 PM in response to jmaline

> I was tricked by the fact that yearfrac() in my bogus little test processed it OK so I assumed it was well-formatted date data.


Ahh, yes... that old "if it looks like a date, and talks like a date, it's really just a string of characters until you say that it's a date' problem :)

Reply

Date on X axis of Numbers 2D Scatter Chart - possible?

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