How to get different Shades in One Excel Chart

excelpunk

Board Regular
Joined
May 6, 2011
Messages
165
Hello Evryone, I have a small issue here, probably some1 can come to rescue!

OK, I have a Excel graph (Dynamic), it has two plots: 1. Area Plot 2: Line plot

I now have a intersection area as and when these two plots coincide, how can I get different colors for different areas.

For Example: Lets say I have a right angle triangle (X Axis, Y axis are its perpendicular sides and lets say there is a hypotenuse in first quadrant, I now have a line (Curve) which cuts the triangle in two parts, Is it possible to have different shades for two different areas of the triangle?

PS: The position of the line (Curve) is dynamic, so I think we need to use some macro to detect if there is a cut, if it is, then we need to give two different colors to the two parts of the triangle. I hope i have given adequate info about my problem!
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
best way to do this without VBA would be to create 6 lines of the triangle that overlapp the same space.

3 lines for black color
3 lines for red color

plot all six lines but put a formula for =NA() for the color that should not be shown.

if no intersection occurs then all lines will show up as black and red lines all =na()

if an intersection occurs on bottom most line, then that equals red value and the black line = na()

here is a good example of the na() used in a line chart to highlight one point.
http://chandoo.org/wp/2010/11/11/highlight-data-points-scatter-line-charts/
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,626
Members
452,933
Latest member
patv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top