I want to fill the color between multiple stacked line graphs in Flot. I tried doing this for just two graphs and that works when I reverse the order of the coordinates in the second graph from max(X) to min(X). Any ideas on how I can do that for multiple graphs?
$.plot($('#graph'),
[
{data:d1, id:'foo'},
{data:d2,id:'bar',fillBetween:'foo'},
{data:d3,id:'baz',fillBetween:'bar'}
],
{
series: {
stack: true,
lines: { show: lines, fill: true, steps: steps }
}
});
Works well for me. Just make sure you include the stack and fillBetween plugins (in that order) in your includes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With