Two color fill between two lines

C

chi_town_eric

Greetings everyone.

To be brief, I have a two line series which compares monthly prices to a
constant benchmark (January 2008) in US dollars and Euros. I have been asked
to shade the areas between the lines where the change in US dollars is
greater than the change in Euros (in blue) and the other way around (in red).
I have been playing around with area charts using a time series X-axis
rather than monthly values, but the graphs aren't quite right.

I found some posts online from Jon Peltier and from Andy Pope, but they
haven't offered an answer to this specific question. In the following
article, Jon mentions two color shading for areas between lines, but I
didn't see a link to a more specific example:

http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=590

If anyone has any insights, I would appreciate it!
 
C

chi_town_eric

Andy,

Thanks. I saw this post, but I'm still struggling with the creation of the
chart. In this post, the "inversion point" is always zero or the x-axis. In
my chart, I need the inversion point to be dynamic. Have you seen anything
like that when trolling around?
 
C

chi_town_eric

Andy,

I did see that post, and I walked through the examples. That did spark an
idea for another little issue I'm having. So, thanks for that.

However, I was hoping to avoid creating something in an XY format. It still
feels like it's possible given the right formulaic approach.

I will email you a dummy file, and thanks in advance for the help.

Regards,

Eric
 
A

Andy Pope

Hi,

The problem is the step between each point is not detailed enough to allow
the area fill to change direction between 2 points.
This results in area colours outside of the lines when they cross at a point
other than the center of 2 points.

So you need to calculate the data points and intersection points for the
line.
http://www.andypope.info/charts/intersection.htm

Then create area charts based on this more accurate information. This will
mean using the numeric axis rather than categorical one you currently have.

Cheers
Andy
 
J

Jon Peltier

Since you're using a line chart, you can use up/down bars. It's a little
different than filling the area between two lines, but it's easy to
implement, and it doesn't indicate that the change is continuous between
reported values.

- Jon
 
C

chi_town_eric

Jon,

Thanks for weighing in. Since you mentioned the two-color approach in one
of your articles, I thought maybe you had something already published out
there somewhere.

I did think about the +/- error bars, and that may be the path forward in
the spirit of keeping things simple.

Thanks again for the suggestions.

Regards,

Eric
 
C

chi_town_eric

Andy,

Thanks for taking a look at the spreadsheet. I thought maybe there was a
trick out there that I just couldn't figure out myself.

Thanks again for taking a look.

Regards,

Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top