javascript - How do I fill color in between multiple stacked line graphs in Flot? - Stack Overflow

I want to fill the color between multiple stacked line graphs in Flot. I tried doing this for just two

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 badges
Add a ment  | 

1 Answer 1

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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信