How to fill color between multiple graphic lines in Flot?

I want to fill in the color between several glass line graphs in Flot. I tried to do this for only two graphs, and it works when I change the coordinate order in the second graph from max (X) to min (X). Any ideas on how I can do this for multiple graphs?

+4
source share
1 answer
$.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 stack plugins and fillBetween (in that order).

+8
source

Source: https://habr.com/ru/post/1343234/


All Articles