+ Reply to Thread
Results 1 to 9 of 9

Create a stacked area chart with non-uniform x-axis values

  1. #1
    Registered User
    Join Date
    03-12-2017
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    15

    Create a stacked area chart with non-uniform x-axis values

    I have a dataset with datetimes as column headers, and the datetimes are non-uniform, i.e. they are not every x hours, e.g. I have a columns with 22/11/2017 13:12, 22/11/2017 19:03, 24/11/2017 10:46. That is, the intervals between the datetimes could be a few hours or several days. In each column I have several rows of numeric data.

    I would like to create a stacked area chart with a datetime axis. However, Excel either treats the columns as uniformly spaced (when text format is selected for the x-axis), or only shows one data point per day (when date format is selected for the x-axis). I have managed to create a line chart of this data, by using the scatter chart and joining the points with a line. But I cannot find any equivalent way to make a stacked area chart.

    Anyone know how to do this?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to create a stacked area chart with non-uniform x-axis values

    Hi,

    Please help us out by uploading the workbook. This avoids us having to guess what your workbook looks like.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    03-12-2017
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Create a stacked area chart with non-uniform x-axis values

    How do I do that? The attachment button doesn't do anything.

  4. #4
    Registered User
    Join Date
    03-12-2017
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Create a stacked area chart with non-uniform x-axis values

    Do I need to have a minimum number of posts before I can upload?

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Create a stacked area chart with non-uniform x-axis values

    No,
    Unfortunately the paperclip icon isn't working - and hasn't been for yonks (no don't ask me!).

    Yuo can uopload by looking for the 'Manage Attachments option immediately underneath the post pane. You need to first click the 'Go Advanced' button at the bottom right of the post pane.

  6. #6
    Registered User
    Join Date
    03-12-2017
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Create a stacked area chart with non-uniform x-axis values

    OK, I have uploaded it. How do I attach it to this thread?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-12-2017
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Create a stacked area chart with non-uniform x-axis values

    Oh, there it is

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,453

    Re: Create a stacked area chart with non-uniform x-axis values

    Excel's date axis does not see the time part of the data. I see two possible approaches:

    1) Scale the date/time data so that it will show up properly on the date axis, then use a "dummy series" to fake the axis showing the original data. Your example data shows times to the nearest minute. If minute is the smallest increment you need to see, then scaling by a factor of 24*60 should be sufficient.
    2) Use an XY + stacked area combination chart. The XY part of the chart will show the existing date time data (without some of the nice calendar options available with a normal date axis) and the stacked area (with arbitrary number of points) will be used for the stacked areas.

    This tutorial should help: https://peltiertech.com/fill-under-b...n-excel-chart/ Pay particular attention to how he creates the "arbitrary" X axis data for the area/stacked area series in the spreadsheet. Once you understand how he is using arbitrary "dates" to build the x axis data for the stacked area series, you will be in a better position to scale your date/time data so it will fit into correctly spaced date to get the desired effect.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  9. #9
    Registered User
    Join Date
    03-12-2017
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Create a stacked area chart with non-uniform x-axis values

    Thank you, I will try the approach in that tutorial and let you know how it goes.

+ 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: 5
    Last Post: 12-09-2015, 12:41 PM
  2. Replies: 0
    Last Post: 07-09-2015, 06:21 AM
  3. Replies: 2
    Last Post: 12-16-2014, 12:47 PM
  4. Trying to create a stacked column chart with data above and below the x-axis
    By funkmeister79 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-24-2013, 10:54 AM
  5. Create a Combined Chart for Stacked Area and Scatter
    By PosseJohn in forum Excel General
    Replies: 2
    Last Post: 11-29-2010, 12:53 PM
  6. [SOLVED] how do I create a stacked bar chart on 2 axis>
    By peterhall99 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-26-2006, 02:45 AM
  7. How to create combination stacked area and line chart?
    By BarbAug in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-19-2005, 09:06 AM

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