+ Reply to Thread
Results 1 to 10 of 10

Color zones on graph

  1. #1
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Color zones on graph

    Hi, is there a way to automatically put color zones on graphs? Pls see attached. I would like the area below 1.5 to be red zone, 1.5 to 2.0 to be blue zone and above 2.0 to be green zone. Thanks.
    Attached Images Attached Images

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Color zones on graph

    Here is a link to a site that has instructions on how to create the zones that you want.
    http://peltiertech.com/excel-charts-...izontal-bands/
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Re: Color zones on graph

    Thank you.

  4. #4
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Re: Color zones on graph

    Hi, I went through the exercise starting from scratch but could not get the secondary vertical axis to max at 8.0 (the same as the primary vertical axis). Do you have the same problem?
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    12-18-2016
    Location
    London
    MS-Off Ver
    Microsoft 2013
    Posts
    145

    Re: Color zones on graph

    Select the data for the bands (the shaded range F1:H8) and create a stacked area chart (not stacked 100% area), with series data in rows. The charts all look the same for a few steps, until we actually have a series that has either XY, Column, or Line type.
    This is as good a time as any to apply your fill colors to the bands. It is best to use light shades, so the bands do not overwhelm the original data.
    Copy the original data, select your chart, and use paste special to add the data as a new series. It is added as another stacked area series.
    Change the added series to the desired chart type (XY Scatter, Column, or Line). Now the charts assume their unique appearances.
    Format the new series and assign it to the secondary axis. This was already done in the first chart when the added series was converted to XY type.

  6. #6
    Forum Contributor
    Join Date
    12-18-2016
    Location
    London
    MS-Off Ver
    Microsoft 2013
    Posts
    145

    Re: Color zones on graph

    Select the data for the bands (the shaded range F1:H8) and create a stacked area chart (not stacked 100% area), with series data in rows. The charts all look the same for a few steps, until we actually have a series that has either XY, Column, or Line type.
    This is as good a time as any to apply your fill colors to the bands. It is best to use light shades, so the bands do not overwhelm the original data.
    Copy the original data, select your chart, and use paste special to add the data as a new series. It is added as another stacked area series.
    Change the added series to the desired chart type (XY Scatter, Column, or Line). Now the charts assume their unique appearances.
    Format the new series and assign it to the secondary axis. This was already done in the first chart when the added series was converted to XY type.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Color zones on graph

    Quote Originally Posted by L.LEE View Post
    Hi, I went through the exercise starting from scratch but could not get the secondary vertical axis to max at 8.0 (the same as the primary vertical axis). Do you have the same problem?
    Select the Secondary Vertical Axis the right click and choose Format Axis. In Axis Options choose Maximum and enter 8. Click close.

    I eliminated all but 3 of the colours to match your example and added values to approximate your distribution of the horizontal bars. I deleted the X and Y axis for the original Area Chart and then moved the X and Y axis to the normal positions of bottom and left by changing the values in the Format Axis to where the Axis crosses to Automatic. If the Axis doesn't move choose Axis value of 0.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Re: Color zones on graph

    Thanks. I could manually do that but was wondering if there is a way for left and right vertical axis to synchronise automatically.

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

    Re: Color zones on graph

    Not built into Excel, but, if we go back to Jon Peltier's site, he has a couple of tutorials that should be useful for such a thing:

    http://peltiertech.com/secondary-axe...tional-scales/ shows how to "fake" the secondary axis using a dummy series. You can manually set the axis values for the primary axis, enter those values into the spreadsheet, then have formulas for the dummy series that becomes the secondary axis.

    http://peltiertech.com/link-excel-ch...lues-in-cells/ has a VBA routine that can automatically link axis limits to spreadsheet cells, where you can have whatever formula you like in those cells. You can manually enter primary and secondary axis values into cells, or enter the primary axis values, and have formulas that calculate the secondary axis values from the primary axis values.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  10. #10
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Color zones on graph

    I think that VBA might be able to accomplish that. I say "might" because I don't know for sure.

    Perhaps someone with VBA charting experience could chime in with an opinion on accomplishing the automation.

+ 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. [SOLVED] color graph
    By kimudao in forum Excel General
    Replies: 1
    Last Post: 12-08-2015, 12:31 AM
  2. [SOLVED] Automatic Bar Graph with color
    By manish Joshi07 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-22-2015, 03:03 AM
  3. [SOLVED] Color Formatting of Graph Series (via Graph Series Label)
    By James McEwan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-26-2015, 06:51 AM
  4. Make Graph Label Show Two Different Time Zones
    By Howard Stevens in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-12-2014, 03:24 AM
  5. Multi-Color Bar Graph Help -
    By grbac6800 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-30-2013, 01:28 PM
  6. Color Combo box for a Bar Graph
    By SCFM in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-30-2010, 04:17 PM
  7. [SOLVED] How do I change the color in a graph?
    By Samandruby in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-09-2005, 06:15 PM

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