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?
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?
Share Improve this question asked Mar 10, 2011 at 20:05 Vijay KotariVijay Kotari 2,0453 gold badges16 silver badges16 bronze badges1 Answer
Reset to default 8$.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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745051211a4608397.html
评论列表(0条)