• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Chart Shading

Hello,
I want to create a chart like this:
70978

Note how the chart is shaded vertically for the years 2020-24. I did this by inserting a colored shape box and placed it carefully. However, when I view this on different monitors it can render differently, and the shaded box is not lined up where it should be.

Is there a better solution for this, so that the shading is a part of the graph and not an overlaid shape?

Paul
 
That's so clever! I never thought of it. By experimenting, I was able to get a hard edge:
70988

The trick is to have two gradient stops, in this case, one white and one gray, and align them at the exact same place. Now, when I resize the graph, everything is perfectly rendered no matter the resolution of the monitor.

Thanks so much.
 
71002

This is a combination chart comprising a line series and two column series.
The labels on the secondary axis (min=0, max=1) are set as 'none'.
The column shading is 70% transparent to allow any grid lines to show through.
The formula text is shown in green. It is possible, though somewhat tricky, to move these helper ranges to defined names.
 

Attachments

  • ComboChart.xlsx
    16.3 KB · Views: 3
Thank you, Peter. This is very creative and professional. It has the advantage of not needing to line up shaded areas to correspond with the dates.
Can you attach the file for the second chart without the helper ranges? I need to see how the range name was set up.
Paul
 
The key point is that the defined names refer to formulas that evaluate as arrays, but they are not range references.
 

Attachments

  • ComboChart.xlsx
    16.3 KB · Views: 5
Back
Top