+ Reply to Thread
Results 1 to 8 of 8

Histogram with vertically divided zones

  1. #1
    Registered User
    Join Date
    08-04-2015
    Location
    CO
    MS-Off Ver
    2013
    Posts
    13

    Histogram with vertically divided zones

    Hi,

    I am trying to add some background color to a histogram plot to split it up into "Pass", "Minor", and "Fail" zones. You can see what I tried to do in the "Dash" tab in the attached spreadsheet. See also the screenshot. I was able to add the background colors for the time series plot (upper plot), but was not quite able to make it work for the histogram plot (lower plot). It is actually almost there. I can make the colors fill the plot area, but I just cannot figure out how to have the colors be in the background. Currently the colors are in the foreground.


    Ali
    Attached Files Attached Files
    Last edited by ali_excelforum; 10-23-2015 at 09:46 PM. Reason: Improved title

  2. #2
    Registered User
    Join Date
    01-21-2015
    Location
    St Paul MN
    MS-Off Ver
    2007
    Posts
    2

    Re: Histogram with vertically divided zones

    Go into format, then chart area. Select gradient fill, choose the appropriate colors and it will fill in the background of your chart.
    Attached Files Attached Files
    Last edited by markw1974; 10-24-2015 at 12:25 AM.

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

    Re: Histogram with vertically divided zones

    to your normal column chart add 2 new series
    move both to secondary axis and change to stacked area chart.

    add secondary horizontal axis and set cross on tickmarks.

    format plot area to final band colour.

    You just need to make the band values relevant to your data as I used fixed values
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    08-04-2015
    Location
    CO
    MS-Off Ver
    2013
    Posts
    13

    Re: Histogram with vertically divided zones

    markw1974,

    Thanks, but that is not the effect I am going for. I want the background for just the plot area (as opposed to the whole chart area) to be divided into vertical bands of different colors representing "Pass", "Minor", and "Fail" zones.



    Andy,

    That is close, but I want those horizontal bands in your sample to be vertical instead like the histogram in the "Dash" tab. Only I want them to be in the background rather than the foreground as they currently are. I already know how to make the bands fill the plot area. It is just that they are in the foreground so they cover up the histogram instead of remain in the background hence why I left them as not filling the plot area.

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

    Re: Histogram with vertically divided zones

    This uses 3 series on the secondary axis plotted as area charts.
    The secondary horizontal axis uses date format in order to get the accuracy.
    Therefore the data values need to be factored up, in this case by 100.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-04-2015
    Location
    CO
    MS-Off Ver
    2013
    Posts
    13

    Re: Histogram with vertically divided zones

    Thanks!

    I have been playing with it and I am wondering is it possible to make the green region always end at the right end of the plot? For example, if I keep refreshing the calculations (so as to change the random number computations) it is not long until I find that the green region does not go all the way to the end. At first, I thought it was just Excel's animations going slowly, but that did not pan out.

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

    Re: Histogram with vertically divided zones

    The auto maximum scale must use a value greater than the max of the bin data.

    You could simply set the fill colour for the plot area to match with the green

  8. #8
    Registered User
    Join Date
    08-04-2015
    Location
    CO
    MS-Off Ver
    2013
    Posts
    13

    Re: Histogram with vertically divided zones

    I tried to create the chart on my own. I cannot get it to work out nor figure out what is wrong. Here is what I did:

    1. Create the histogram using D2:D12 as the values and B2:B12 as the category labels.
    2. Special paste A15:D22 into the chart using columns as series, first row as series labels, and first column as category labels.
    3. Convert each of the three newly added series to be of type stacked area and to be plotted on a secondary axis.
    4. Adjusted the secondary horizontal axis to be of date format and have its vertical crosses between dates to match yours.
    5. Performed sundry formatting such as colors and axes placement.

    Screenshot: http://i.imgur.com/oxdTeVa.jpg
    Worksheet: DynamicChartBackgrounds_AliTesting.xlsx
    Last edited by ali_excelforum; 11-13-2015 at 11:52 PM.

+ 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. Vertical line in a histogram (vertical bar chart)
    By AdamCPTD in forum Excel General
    Replies: 2
    Last Post: 11-18-2017, 03:04 AM
  2. [SOLVED] Looking up a price band?
    By mintribe in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-13-2013, 09:14 AM
  3. Superimposed histogram A on histogram B
    By firuz in forum Excel General
    Replies: 5
    Last Post: 05-26-2007, 09:10 PM
  4. [SOLVED] I was creating a histogram; now i have data but no histogram.
    By ShannonMills3 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-13-2006, 07:10 PM
  5. [SOLVED] How to Histogram w/o raw data but histogram Table on Excel
    By 2005 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-01-2006, 02:50 AM
  6. Age band formula
    By Duke Carey in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 09-06-2005, 06:05 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