Unofficial archive. This is a read-only, community-run archive of the Apple Support Community. It is not affiliated with or endorsed by Apple Inc.

Numbers: X-axis scale not working for stacked bar charts with dates

I have a Numbers charting problem here and not sure if this is a bug or I'm doing something wrong. Former Excel and Powerpoint instructor and power user. Glad to be off of Office but, I've done this dozens of times in Excel and I cannot get it to work in Numbers (everything latest versions on 3 month old MB Neo).


The problem: you need to build a Gantt style bar chart but, don't have a project management tool. My go-to method in Excel:


  • Build a basic table with task description in the first column
  • Start date in the second column
  • Duration of the task in the third column.


From this data, create a horizontal, stacked bar chart. That would show the starting date as the first bar and then the duration stacked on top of it.


When you're done with this, you make the 'start date' series No-Fill and it becomes a Gantt chart! The no-fill trick works and that's not my problem.


What does not work is setting the X axis scale. I had this first go wrong in a real file. I then created this much-simplified version to see if I could duplicate the problem. It does indeed, not work.


In this example, there is no math going on in any of the cells. This is purely typed in as dates and integer numbers for the durations. Under the Chart formatting, Axis, Value (X) axis, you can see the fields to enter the Min and Max for the scale. This is the part that does not work.



Above is what the chart looks like immediately after creation. Below is what happens after you enter the Min and Max for the X axis scale. They are entered as Dates. That's how Numbers seems to want them. I have used this entry format on other chart styles and they work properly. It seems to only be the 'stacked' type of chart where this blows up.




It takes the values but, what it does to the X-axis is a mystery. The dates aren't even close to being reflected in that scale. I entered October 1 and October 30 as the min and max. It should be a one-month range on the chart.


Does anyone have any idea how to fix this? Numerically speaking, Excel always treated Dates as a day count from either 1900 or 1904 (insert old man shouting at clouds here). Days added as I've done here would math out to new time values that could be formatted as integer, date or whatever.


Or is this a legitimate bug to report to the mothership?

4 replies

Maybe it's classifiable as a bug, but there's also an inherent problem with your data that may be feeding it...


I recreated your data as-is and confirm what you see, but the problem is you're trying to combine a date/time value with an integer. If you follow your Excel logic, where date/times are a number of seconds from the beginning of time (by Number's epoch date of Jan 1, 1970), then you're trying to graph a date in October 2026 with the date of January 2nd, 1970. No wonder it gets confused.


In order to use a Stacked Bar chart, the units of the values have to be the same - in other words you can't combine a date/time with an integer.


I was able to complete your chart by converting the 'Duration' column to be actual Duration fields (e.g. '2d' for two days, rather than an abstract number 2), and adding a calculated column that adds that value to the start date:



There's a twist, though... you still can't use these end dates as-is, because Numbers will calculate them as an offset from the first date in order to stack:




In this case, you can see that you're having a whale of a party, because Numbers is calculating the difference between the first date (10/15) and this date (10/25) and adding a 10-day bar on top of the start date. To fix that you need to change the End Dates to reflect the end date that would occur if everything started on the first day. To do that I changed the formula in D2 to:


=$B$2+C2-1


The addition of preserving the row and columns for $B$2 and adding the current row's Duration gives me, essentially, bogus dates, but ones that will now reflect the way you want in your chart.


So now you can chart the Start Date and End Date columns on a Stacked Bar rather than the Duration. Since they're both the same class of date times, the chart looks more like you'd expect:



A quick edit to change the style of the Start Date values to No Fill suppresses the blue, to get you more like the Gantt chart you're looking for:



So, yes, it's funky, and Excel probably does some of the heavy-lifting in the middle by making assumptions about what it is you're trying to do when you graph a date and a number together. It's not unreasonable to report the funky axis labels when you try to override them since that does seem bizarre, but I suspect Apple will shrug its respective shoulders at what you're trying to do.



I recreated your data as-is and confirm what you see, but the problem is you're trying to combine a date/time value with an integer. If you follow your Excel logic, where date/times are a number of seconds from the beginning of time (by Number's epoch date of Jan 1, 1970), then you're trying to graph a date in October 2026 with the date of January 2nd, 1970. No wonder it gets confused.

You are clearly the person I needed. In Excel, dates are calculated as days since their epoch (either Jan, 1 1900 or 1904, as you're clearly aware). Heck, in checking this, I just opened Open Office on my PC and discovered they used 1899 as their Epoch date. In Open Office Calculate, today is 46304 as an integer.


So in Excel, time managed, fractional calculations were clumsy to deal with (hours, minutes, etc). I've been out of Excel for six years now so they may have improved things, though I'm not optimistic.


With that out of the way: part of what I was recently telling someone was that for an older person, it's not that they're slow to learn, it's that for all of their life, the sun always came up in the east and set in the west. I've been on Excel since 1994? Taught it for a couple of years in there? 32 years of things always working a certain way.


Moving to Numbers means unlearning all the bad habits from Excel and giving up expectations of how it's just supposed to be. I have found over and over that the programmers seem to have rethought all of these things and actually fixed what Excel had wrong all the way back when the earth cooled.


And you absolutely blew my mind that Numbers accepts and manages time in various units. That's very MS-Project-like of it. Even if there is a bug here, you taught me another bit of how great Numbers really is compared to Excel.

In order to use a Stacked Bar chart, the units of the values have to be the same - in other words you can't combine a date/time with an integer.


Yeah, that did work just fine in Excel. As mentioned: a date was just a whole integer number with formatting. You've now enlightened me that perhaps the old workarounds are not necessary in Numbers. I need to rethink how I handle units.


The addition of preserving the row and columns for $B$2 and adding the current row's Duration gives me, essentially, bogus dates, but ones that will now reflect the way you want in your chart.


Thank you. Either one is a hack and gets the result I wanted. What I really wish for is MacProject for 2026. They sold it for the early Mac. The Lisa shipped with Lisa Project. No idea why Apple hasn't come up with their own for the modern era. Don't they do project planning? Yeah, taught MS Project too. The very last class I taught was MS Project.


So, yes, it's funky, and Excel probably does some of the heavy-lifting in the middle by making assumptions about what it is you're trying to do when you graph a date and a number together.


No, no apologies or excuses for Excel here. Haha. No, Excel is not better. No it does not do heavy lifting. Numbers has astounded me for how much better it is to deal with. I'm shouting it from the rooftops to all of my friends, that they need to dump their MS-365 subscriptions and move.


I'll look into reporting the scale thing. Heck, I had even tried converting the dates to integer and inputting them as whole integer numbers and it really didn't like that. I see now that it's handling time data in a completely different way.


Thank you again.


> What I really wish for is MacProject for 2026


I hear you, although standalone project management is more of a specialized thing now, and not mainstream. Hard to see Apple bringing that back.


For pure project planning, there are potential options, though. I'm kind of a fan of OmniPlan, plus there are a number of web-based resource/ticketing systems such as Jira or Zoho that have decent project planning/mapping tools built in, although they tend to be geared towards team-based projects, so may be overkill.

Thanks to you, I went out in search of more knowledge on dealing with time units in Numbers. I was not disappointed. Wow. Just wow. So much good time handling in Numbers.


https://www.youtube.com/watch?v=Ap89xT46y2Y


For pure project planning, there are potential options, though. I'm kind of a fan of OmniPlan, plus there are a number of web-based resource/ticketing systems such as Jira or Zoho that have decent project planning/mapping tools built in, although they tend to be geared towards team-based projects, so may be overkill.


Ahh, well, yes, my application is for integrated schedules, resource allocation and tracking, cost planning and all the things that most people never used in MS Project because "it's too complicated." What I find is most project planning programs are really just glorified Gantt charts. I want something to input and manage real information under those bars.


It really is my one hold-over from the MS suite. I've still not seen anything that approaches the capability of MS Project and that disappoints me.


Related story: I bought a seat of MS Project in 1994-1995? Something like that. Mac version. Quadra 650 and color StyleWriter 2400. Not a mishmash of weird products. Both devices were solid, center of the range, office devices.


MS Project would crash every time you tried to print on the StyleWriter. It was eventually reported to the world as a known bug. "Yeah, we'll fix it in the next version" which never came. I believe the next version had no 68xxx support and I was expected to pony up to pay for a new seat of Project again. Their answer was "just don't print." Yeah, because I paid all this money to do complex critical path planning and not be able to print out the information.


That was the beginning of the end for Microsoft and I. If I need to sit down and use MS Project, it's on my PowerMac 7600 and I "just don't print." Haha.