Fill between lines with colour depending on order
I would like to fill a space between two lines that generally move up and down, but sometimes one is above the other, and sometimes the other way. And I'd like the fill colour to reflect which line is on top.
Take the following as an example.
https://jsfiddle.net/xczdfkjf/1/
Where the lower and upper ends of the range cross over, between 6 Jul and 7 Jul, I'd like the fill colour to change.
I originally posted this question here back in 2016, and have seen similar questions/requests, but still in 2021 it is not possible :( https://stackoverflow.com/q/41292433/4070848
The answer in the above stackoverflow is neat, but it doesn't fit my requirements because I need the lines to be splines not straight lines.
Plus, I feel that there should be a simple series option for this, rather than having to rely on really complex line-crossing algorithms and zones (my chart already has zones along the x axis for other reasons, e.g. to suppress display of parts of lines that just flatline along zero, so to add more into the mix would be a nightmare).
-
Ben commented
I was going to ask this too!