+ Reply to Thread
Results 1 to 9 of 9

How do you format stacked area/column chart x-axis like a scatter plot?

  1. #1
    Registered User
    Join Date
    08-11-2014
    Location
    Vancouver, Canada
    MS-Off Ver
    2016
    Posts
    4

    How do you format stacked area/column chart x-axis like a scatter plot?

    Hi all, I'm having trouble formatting my stacked column and area charts. I can't get them to autoscale the x-axis (like a scatter plot can do) and I also can't get the stacked area chart to plot y-values from empty, "" or #N/A cells without forcing the graph down to zero (like a scatter plot or stacked column can do).

    I am aware this may be possible with VBA but I need a solution that does not involve VBA.

    Any suggestions would be much appreciated!

    I've attached a screenshot with the formatting problems marked in red.
    Capture.PNG

    EDIT: generic workbook attached with a stacked area chart that has the same issue.
    EDIT: I've found a workaround that solves the stacked area plotting blank values, so now just looking for a solution to the x-axis autoscale problem.
    Attached Files Attached Files
    Last edited by jo2104; 10-13-2023 at 10:00 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,539

    Re: How do you format stacked area/column chart x-axis like a scatter plot?

    That doesn't look like an Excel version in your profile. More likely Windows 8.1. Please update your profile.


    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-11-2014
    Location
    Vancouver, Canada
    MS-Off Ver
    2016
    Posts
    4

    Re: How do you format stacked area/column chart x-axis like a scatter plot?

    Thank you TMS, I have updated my post

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: How do you format stacked area/column chart x-axis like a scatter plot?

    The horizontal axis on an area chart is categorical.

    If you format axis as Date you can get a more numerical version. But it starts at one, not zero. So you may need to add a dummy series to redraw the axis labels using datalabels of the dummy series.

    You need to include a set of datapoints at the last value in order to get the vertical drop, rather than a slope.

    N/A is a stacked chart is treated as zero
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    08-11-2014
    Location
    Vancouver, Canada
    MS-Off Ver
    2016
    Posts
    4

    Re: How do you format stacked area/column chart x-axis like a scatter plot?

    Thank you Andy for your reply. I am aware the horizontal axis can be changed from categorical to numerical, but I don't understand how this will help autoscale the axis to avoid showing all the white space to the right of the plotted values? The axis formatting options for an area chart don't allow formatting min/max bounds like you can do for a XY scatter chart.

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

    Re: How do you format stacked area/column chart x-axis like a scatter plot?

    The axis formatting options for an area chart don't allow formatting min/max bounds like you can do for a XY scatter chart.
    Unless something significant has changed between your newer version and my older version, this doesn't seem right to me. I can open Andy's file, select the horizontal axis, and choose whatever values I want for the min/max of the date axis. For example, I can enter 1/10/1900 and 2/9/1900 if I want the axis to have limits of 10 and 40. The only hard part is that my version of Excel INSISTS on short date entry in the axis limit fields, so I need some way in the spreadsheet of figuring out what date corresponds to the "date serial numbers" I want.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Registered User
    Join Date
    08-11-2014
    Location
    Vancouver, Canada
    MS-Off Ver
    2016
    Posts
    4

    Re: How do you format stacked area/column chart x-axis like a scatter plot?

    Hi MrShorty, yes I understand the bounds can be manually changed, but I need the bounds to automatically change in response to new/overwritten x-axis data. In other words I want the chart to change itself, not from user input.

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

    Re: How do you format stacked area/column chart x-axis like a scatter plot?

    That's the real problem isn't it. To my knowledge, the automatic algorithm MSFT has provided is the unchangeable one behind the "Auto" setting in the axis dialog. Obviously, we can write a macro in VBA or other programming language that will calculate and update the axis limits, but, in the OP, you say that you cannot use VBA (I assume that applies to other macro languages, too). Until MSFT provides additional built in options, we are stuck with the default Auto algorithm, manually changing the axis, or some kind of macro.

    On the off chance you decide that you can relax the restriction against VBA, this is the best way I'm aware of to automate changing the axis limits when Excel's default Auto algorithm isn't suitable: https://peltiertech.com/chart-udf-control-axis-scale/

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: How do you format stacked area/column chart x-axis like a scatter plot?

    If you have the horizontal axis set to auto then simply provide data points for the min and max values.

+ 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: 0
    Last Post: 07-09-2015, 06:21 AM
  2. shared x-axis for column and scatter chart in same plot
    By sophiereid in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-23-2014, 02:42 PM
  3. Stacked column combined with xy scatter plot.
    By S K ROY in forum Excel Charting & Pivots
    Replies: 41
    Last Post: 03-18-2012, 04:09 AM
  4. Plot points on a area chart or plot areas on a scatter chart
    By maggy in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 01-17-2012, 04:39 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. Plot 3 sets of data in scatter chart and area chart in one
    By geoffs52 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 12-24-2009, 04:42 AM
  7. [SOLVED] How to enlarge stacked chart plot area
    By Carole O in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 08-02-2005, 05:05 PM

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