Forum Discussion

Doree515's avatar
Doree515
Copper Contributor
Oct 14, 2022
Solved

Change X-Axis scale to a time format on a scatter chart

I created a scatter chart with time (hh:mm:ss) on the X-Axis. The scale ranges from 00:00:00-2:52:48, and the intervals increase 28:48, 57:36, 1:26:24,...2:52:48. I'm not sure where this is coming fr...
  • Riny_van_Eekelen's avatar
    Oct 14, 2022

    Doree515 Axis options are set to automatic by default. So Excel tries to create a nice looking axis with not too much clutter. You can override that by right-clicking (mouse) or two-finger-clicking (track pad) on the axis. Select "Format Axis..." Now, in the Options tab you can set the Bounds and Units for the axis.

    BUT, it's not as straight forward with time values as it is with "normal" numbers. Time is stored as numbers, relative to one whole day of 24 hours (or 1440 minutes).

    The above settings will create an axis from 00:00 (Minimum 0) to 08:00 (Maximum 0.33333). Note that the time value for 08:00 (8 AM) =  8 / 24 = 0.33333

    Similarly, the Major Unit is set by taking the number of minutes between each label and divide that by 1440. Above I took 30 minute intervals. Thus, 30 / 1440 = 0.020833

    The  Minor unit calculated automatically.

     

    In your particular situation, try setting the lower bound to 0.7986111 (being the time value for 01:55 i.e. 115/1440). Play around a bit with the upper bound and major units until you have the axis that looks good for you.

Resources