+ Reply to Thread
Results 1 to 10 of 10

How to shade the area between two lines in a line chart?

  1. #1
    Registered User
    Join Date
    07-10-2021
    Location
    GENEVA
    MS-Off Ver
    EXCEL FOR MAC MICROSOFT 365
    Posts
    80

    How to shade the area between two lines in a line chart?

    In the enclosed daily temperature chart I would like to shade the area between the lower temperature and the upper temperature. I searched in this forum but did not immediately find anyone who raised the question before, (Apologies if I missed it).Screenshot 2022-06-04 at 10.06.43.png.

    Hopefully this is just a simple chart "type" that I have missed (area charts?), but if not, perhaps there is another solution?
    Attached Files Attached Files

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: How to shade the area between two lines in a line chart?

    https://www.youtube.com/watch?v=2nAnNEATUZU
    There's a bunch of answers out there but we are not permitted to add links to competing forums
    Look for "shade area between lines" or something equivalent
    Last edited by Pepe Le Mokko; 06-04-2022 at 04:17 AM.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: How to shade the area between two lines in a line chart?

    Change it to a stacked area chart and set the bottom axis fill colour to white.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: How to shade the area between two lines in a line chart?

    @AligW, you need to calculate the top stack, High temp - Low temp, otherwise the values will be incorrect.

    Also use no fill rather than white, that way you can still see the horizontal gridlines
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: How to shade the area between two lines in a line chart?

    You'll have to show the OP how to do that - sorry.

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

    Re: How to shade the area between two lines in a line chart?

    I have attached an example chart.

    The formula is =C2-B2

    Now the top of the shaded area is in the same position as the original line.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    09-03-2016
    Location
    Catania, Italy
    MS-Off Ver
    Excel 2019
    Posts
    164

    Re: How to shade the area between two lines in a line chart?

    Hello everyone
    To leave the two original series with their color and have the colored area, I did this:
    - first I set the two series (line chart)
    - then I added the first series (again), changed the chart type to stacked area chart and set the fill to No color
    - finally I added the third series (the data of column D), I changed the chart type to stacked area chart.

    My Graph is the one on the bottom left.

    Hello,
    Mario
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-10-2021
    Location
    GENEVA
    MS-Off Ver
    EXCEL FOR MAC MICROSOFT 365
    Posts
    80

    Re: How to shade the area between two lines in a line chart?

    Thank you very much AliGW. Sorry for the delay in replying. (We had a long weekend bank holiday here so we went away without access to my computer.)

    I see there are more replies after yours, which I have not yet read. Your answer was exactly the kind of answer I was looking for (a simple change of chart type to stacked area).

    However I made three modifications to the chart you returned:
    1) "High Temperature" cannot be left as is. High temperature now needs to be the difference between high and low temperatures for the chart to display correctly. (Easy fix, it's column "C" minus column "B")
    2) I changed the fill colour of the low temperature from white to "no fill", so that I could see the axis lines. (Format Data Series to "no fill")
    3) I changed the transparency of the high temperatures from green to green with transparency of 50% (Format Data Series to "Solid fill", Transparency 50% in order to see the grid lines.

    I shall now review the additional solutions proposed after yours.

  9. #9
    Registered User
    Join Date
    07-10-2021
    Location
    GENEVA
    MS-Off Ver
    EXCEL FOR MAC MICROSOFT 365
    Posts
    80

    Re: How to shade the area between two lines in a line chart?

    Quote Originally Posted by Andy Pope View Post
    I have attached an example chart.

    The formula is =C2-B2

    Now the top of the shaded area is in the same position as the original line.
    Thanks Andy Pope. I spotted both of the points you made before reading your comment(s). To complete the chart the transparency of the top stack has to be set to 50% in order to see the grid lines. As you mentioned, the bottom stack just needs to be set to "No fill" for the same reason.

  10. #10
    Registered User
    Join Date
    07-10-2021
    Location
    GENEVA
    MS-Off Ver
    EXCEL FOR MAC MICROSOFT 365
    Posts
    80

    Re: How to shade the area between two lines in a line chart?

    Thanks Marius. I liked your way of doing it. I have now learned that I can click on a single data to make a multi-style graph i.e. line plus stacked area.

+ 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. Add vertical lines below a line chart
    By mq1973 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 12-26-2019, 06:51 AM
  2. [SOLVED] Setting line chart settings in VBA for unspecified number of lines in a chart
    By Vegiepie2016 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2016, 07:30 AM
  3. Replies: 2
    Last Post: 11-14-2012, 08:59 AM
  4. How to stop lines in a line chart?
    By nickFe in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-08-2011, 12:51 AM
  5. I can't get any lines in my line chart
    By Alex in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-07-2006, 11:05 PM
  6. how do i shade the space beween lines in a chart
    By J.S. Rybak, P.Eng. in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-26-2005, 01:50 PM
  7. [SOLVED] Lines missing in line chart
    By Dave_lineless in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-13-2005, 04:05 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