Using d3 to shade area between two lines
Since you don’t have datapoints at the intersections, the simplest solution is probably to get the areas above and below each line and use clipPaths to crop the difference. I’ll assume you’re using d3.svg.line to draw the lines that the areas are based on. This way we’ll be able to re-use the .x() and .y() … Read more