+ Reply to Thread
Results 1 to 4 of 4

Graph with time based horizontal axis - Excel 2016

  1. #1
    Registered User
    Join Date
    09-19-2018
    Location
    Geneva
    MS-Off Ver
    2016
    Posts
    2

    Graph with time based horizontal axis - Excel 2016

    Hi all,

    How can I obtain a graph with a date (time scale) based horizontal axis with proper dates/ time interval instead of regular interval?

    I tried with scatter plot, which seems to allow horizontal axis with irregular interval but dont' recognize date format / type in axis option.
    And I tried with line plot, which recognize dates but keep a regular interval between them not taking into account if 1 day or 1 year separate 2 dates.

    There is this super nice description (copied below) in Excel help but I cannot find how to use/ activate that and this has been driving me crazy !!!

    "When you create a chart from worksheet data that uses dates, and the dates are plotted along the horizontal (category) axis in the chart, Excel automatically changes the category axis to a date (time-scale) axis. You can also manually change a category axis to a date axis.

    A date axis displays dates in chronological order at specific intervals or base units, such as the number of days, months, or years, even if the dates on the worksheet are not in sequential order or in the same base units."


    Huge thanks in advance for any tips or help on the matter.
    Kind regards
    Caro

    Using Excel 2016 on Windows.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Graph with time based horizontal axis - Excel 2016

    May need to see an actual sample of the data, because Excel should be able to treat the dates properly in either scatter or line chart types. A scatter chart's x axis should be readily formatted as date (using number format), so I am not sure why you could not format your scatter plot to show dates. A line chart that fails to recognize a date axis (automatically or when manually forced) is somehow not recognizing your dates as dates.

    If I were to look at your spreadsheet, the first thing I would probably check is to see if your "dates" are true date/time serial numbers or if they are text strings that look like dates (probably test with the ISTEXT() function). Numbers/dates stored as text is a common source of these kind of issues.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    09-19-2018
    Location
    Geneva
    MS-Off Ver
    2016
    Posts
    2

    Re: Graph with time based horizontal axis - Excel 2016

    Many thanks for your answer,

    The dates are formatted as dates as per the format cell option / date.
    Is there another way to format date for graph purpose?
    Or they have to be entered manually as dates? I'm using a short dataset that I copied and pasted.

    Now I'm trying to send the file in question.

    Kind regards
    Caro
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Graph with time based horizontal axis - Excel 2016

    The dates are formatted as dates as per the format cell option / date.
    It can be important to recognize that number formatting cannot change the underlying value. If a cell contains a "number/date stored as text", changing the number formatting does not change the text value.

    I don't know what error checking options you have turned on in your copy of Excel (I have most of them turned on). Upon opening your sample file, I noticed little green error triangles on some of the dates in column A. The indicated error is "text date with 2 digit year". I could use the dropdown on each error cell to convert to an actual date value/serial number, but that would get tedious to do them all individually. I tried using the Text to columns approach, and that worked for the few samples given, and the chart immediately reverted to a date axis. I recommend reviewing this help file to review the available strategies for converting numbers/dates stored as text to numbers: https://support.office.com/en-us/art...1-c5bad0f0a885 (note that change number format on cell is not an option).

    From there, you may need to try a few things to see how things like your local/regional date/time setting impact how Excel recognizes and converts dates stored as text and make sure that you get a solid strategy in place that will correctly convert all of the dates stored as text to appropriate date serial numbers. Once you have that in place, your chart should revert to a date axis automatically.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 02-17-2018, 01:18 PM
  2. Excel 2016 - changing graph horizontal access & slicer question
    By clairh2011 in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 11-03-2017, 05:12 PM
  3. Line Graph variable horizontal axis
    By Kat82 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-07-2015, 11:20 PM
  4. Stacked Bar graph with two horizontal axis??
    By jschneiter2 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 11-15-2013, 12:56 AM
  5. Line graph with dates on horizontal axis
    By fish2012 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-04-2012, 08:52 AM
  6. Replies: 3
    Last Post: 03-28-2011, 04:15 AM
  7. How to plot scatter graph on horizontal axis
    By alsupport in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-28-2010, 04:53 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1