You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problem with the Date under the X-axis

Attention Numers gurus!

Big question: Why do the last four dates on the right of the graph default to January when the Dates in the Table has Mar (for March)? Note the last 3 dates have Mar then the last date is for Apr.

This has been going on for serveral days now and I can’t figure out why.


To fix it, I can go into the graph and physically edit the four to Mar and Apr, but that isn’t the best way to go about this. 


Note: All spreadsheet dates in the table’s Date column are set as numbers to Align Right, for what it's worth.


Note: only copied the bottom of the Table due to length:

 Catalina 10.15.7; Numbers 11.0

Mac Pro, macOS 10.12

Posted on Apr 1, 2021 7:26 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 2, 2021 10:52 AM

"My guess is the last four are not correct. How they got that way I do not know. If this is the problem, you can correct them there or redo the chart from scratch."

Bingo!!!

Selected the X-Axis then deleted the Orange range. It now looks like this:

And, the Date range looks like this now!

9 replies

Apr 1, 2021 7:43 PM in response to Searchin99

That is a good question.


  1. Select the chart,
  2. Go to the Axis tab in the sidebar
  3. Click on Category (X)
  4. Click on the list of category labels to expand it so you can see them all.
  5. Look at the last four of them


My guess is the last four are not correct. How they got that way I do not know. If this is the problem, you can correct them there or redo the chart from scratch.


Are you sure you want a category line chart for your data? The X-axis spacing between data points is equal regardless of the number of days between them. A scatter chart is the only true X-Y chart. To make a scatter chart, the X and Y data must both be in normal data cells, not the X in header cells like the other charts require. And you'll have to be careful about the years associated with your dates.

Apr 1, 2021 8:28 PM in response to Badunit

Thanks for the quick reply!

Let me answer the "low hanging fruit" question and make some comments:

  1. Are you sure you want a category line chart for your data? Ans: No, I'm not sure. This is my first graph attempt. Started a couple months ago on it and it has been a learning exercise. (not necessarily the easiest one, either!) Learning how to do something new with an app almost never is.


2.The X-axis spacing between data points is equal regardless of the number of days between them. Reply: I've been looking at the spacing between dates and you're right. However, so far, the overall graph looks good, at least until one gets to the last four data days. I've noticed this problem before, though, and as new data is added the curve tends to smooth out properly, so that is good.


3.A scatter chart is the only true X-Y chart. Reply: Thanks for the input. I think I've read this before here while trying to troubleshoot.

4.To make a scatter chart, the X and Y data must both be in normal data cells, not the X in header cells like the other charts require. And you'll have to be careful about the years associated with your dates. Reply: I like the extra input. I was worried about how the December data point would mess up the graph if I changed anything. The first CDC confirmed variant case was at the end of December and I wanted to keep it accurate. Thought I might deal with it later, if needed. The other option I was considering was covering the Dates to Julian but didn't know how that would affect anything. This graph is being shared with non-scientific-type people so K.I.S.S. is helpful. I can understand scatter diagrams but the typical lay person, probably not so much. Also, "connecting the dots" with a line shows up well, but little dots with space between them don't have as much visual impact.


With regard to editing the dates or redoing the graph, this will take a lot more work. I'm still doing battle with trying to figure out the best way to capture the Table data and put it in the graph. It's been more of a trial-and-error process. Sorry, but just not as fast of a learner as I used to be. Also, selected the wrong computer in the original post; doing this on a MBP 2012, not the MP. Geeze, almost 10 years old now!


As for doing the more difficult part now, I did go to the sidebar and check what all the dates were, and they were all the same type (unless I missed something).

"Note: All spreadsheet dates in the table’s Date column are set as numbers to Align Right, for what it's worth."

Will check this out in some more detail but that, and re-editing the Table, will take some time.

(doing this in dark-mode now ... not as easy to do)

Apr 1, 2021 10:01 PM in response to Searchin99

Initial editing of the table to make it suitable for an xy scatter chart is pretty simple:

  • Copy all to the Date and Time values in column A.
  • Click on any cell in column B, then press option-left arrow to insert a new column to the left of the current column B.
  • Click on the new column B cell to the right of the first date in column A.
  • Paste.


To make the scatter chart:

Select the body cells (containing data) in columns B and C.

Click the Chart button and choose xy scatter.


Select the chart, and choose to connect data points with a curve (or with straight lines, if preferred.


Some frther editing may be necessary for cosmetic reasons, but the main part of the conversion is now done.


Regards,

Barry

Apr 2, 2021 5:08 AM in response to Searchin99

Here is an example of using a scatter chart vs a line chart, both using the same data (which I made up based loosely on yours). The bottom is the scatter chart. They don't look quite the same.


The scatter chart does not have to be a bunch of disconnected points, it can be a line.


You will see in the table that the "Dec 29" date is 2020. The rest are 2021. When you enter a date as Jan 13, Jan 22, etc. (as I did) it attaches the current year to them, which made them all 2021. Rather than changing all, I just backed the first one up a year. You'll probably want to put in the correct year for all of your dates.


Apr 2, 2021 10:40 AM in response to Badunit

"It sounds like you looked at the format of the cells that have the dates but did you select the chart and look at what cells it is using for the X axis labels?"

Ans: No, I hadn't. BUT, I did now!

What happened was, when some rows were added to the Table, the darker black border had reproduced and separated the new rows. The work-around was to back up a row then add new rows. On the screen it didn't look any different.

Here is another screen shot:

So, if I delete the orange range and edit the blue range (if that is possible), click on the green check-mark, then perhaps that will fix the problem.


"That was what I was describing in my last post, how to check that. You will see an entire list of all the cell references it is using for the X axis labels. My guess is the last four are pointing to the wrong cells. It probably got messed up when you were adding new data to the chart."

Reply: Excellent educated guess! Very helpful.


What I would like to have is a line drawing of a Table and a Graph with the terminology of various items identified. Ditto with the side column. Something that can be printed on paper (US letter or A4) and have as a reference on the desk. Did this once with Final Cut Pro and it was very helpful, but that was a few years back and, unfortunately, the layout has changed. Good job for an AutoCad person.

Apr 1, 2021 11:10 PM in response to Searchin99

It sounds like you looked at the format of the cells that have the dates but did you select the chart and look at what cells it is using for the X axis labels? That was what I was describing in my last post, how to check that. You will see an entire list of all the cell references it is using for the X axis labels. My guess is the last four are pointing to the wrong cells. It probably got messed up when you were adding new data to the chart.


The simplest way to fix it, if you choose to stick with the category chart and want to fix it, is to select all of the references in that box, delete them all, then select the correct range of cells from your table (all the dates from Dec 29 through April 1).

Apr 2, 2021 11:04 AM in response to Badunit

Having got the original problem solved, I'll go to work on the Scatter Chart.


The appearance is different from what I thought it would be; didn't know a line could connect the dots. Thought it would look more like a shot-gun approach.


Currently, the last few graph data-points are not as steep as they should be because for a rise of 1,000 they are only one day and two days apart, compared to near the beginning which is over two weeks fora rise of 75, yet the spacing is the same. The slope should be much greater than what is currently looks like, more like on your scatter diagram.


Don't have time to work on it now but will tackle it.

THANK YOU VERY MUCH FOR SOLVING THIS AND ALL THE EXTRA HELP! It was a great learning experience! (Should make a video of this!)

Apr 3, 2021 12:54 AM in response to Searchin99

"Currently, the last few graph data-points are not as steep as they should be because for a rise of 1,000 they are only one day and two days apart, compared to near the beginning which is over two weeks fora rise of 75, yet the spacing is the same. The slope should be much greater than what is currently looks like, more like on your scatter diagram. "


'Regular' spacing on the x axis, with the same separation between dates that are one day apart and dates that are seven days apart would indicate that Numbers is not recognizing the 'dates' as Date and Time values, and is treating them as text.


the most likely reason is that the dates have been placed in a header column where they are treated as Category Labels rather than D&T values, making your chart a Line chart, not an XY scatter chart.


Regards,

Barry

Problem with the Date under the X-axis

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