+ Reply to Thread
Results 1 to 9 of 9

Shading between 2 curve lines on chart

  1. #1
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Thumbs up Shading between 2 curve lines on chart

    Hi,

    On Excel charts we can shade between curves and axis; how can we shade the area between 2 data curves.
    Last edited by Ralem; 02-17-2011 at 03:23 AM.
    Cheers
    Ralem

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,576

    Re: Shading between 2 curve lines on chart

    Make upper curve some area color, and bottom curve make white area

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

    Re: Shading between 2 curve lines on chart

    You can shade by using additional data series plotted as stacked area.
    First additional series should match the lowest curve and be formatted as no border/fill.

    Second additional series should be difference between curves.

    If you need more help post workbook example with your current curve chart
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: Shading between 2 curve lines on chart

    Please have an example attached.
    Attached Files Attached Files

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

    Re: Shading between 2 curve lines on chart

    You can not do the shading easily as you are already using the secondary axis and the area between the curves is based on 2 separate scales.

    You would need to re calculate the Z values so they used the same scaling as the X and Y series.

  6. #6
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: Shading between 2 curve lines on chart

    OK, let me remove the secondary axis, please have a look at the attachment now.
    Is there any other way to fill between the 2 primary curves rather than the mentioned above, by VBA for instance.
    Attached Files Attached Files

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

    Re: Shading between 2 curve lines on chart

    Simplest approach is to change xyscatter to area.
    You will need to add 2 additional series for the intersection and lower red line.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: Shading between 2 curve lines on chart

    Thanks Andy!
    Very supportive

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

    Re: Shading between 2 curve lines on chart

    If you really want VBA the see here for examples.
    http://peltiertech.com/Excel/Charts/BackgroundFill.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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