javascript - morris.js Multiple stacked bars on single label - Stack Overflow

I'm curious if morris.js supports having multiple stacked bars on single label and if someone know

I'm curious if morris.js supports having multiple stacked bars on single label and if someone knows workaround.

I want to have 2 graphs stacked together on same line. Blue and red should be on top each other and green and yellow.

Morris.Bar({
    element: 'daily_revenue',
    data: [],
    xkey: 'label',
    ykeys: ['inbound_netto', 'inbound_brutto', 'outbound_netto', 'outbound_brutto'],
    labels: ['Inbound Netto', 'Inbound Brutto', 'Outbound Netto', 'Outbound Brutto'],
    resize: true,
    barColors: ["#B21516", "#1531B2", "#1AB244", "#B29215"],
    hideHover: true
});

Thank you.

I'm curious if morris.js supports having multiple stacked bars on single label and if someone knows workaround.

I want to have 2 graphs stacked together on same line. Blue and red should be on top each other and green and yellow.

Morris.Bar({
    element: 'daily_revenue',
    data: [],
    xkey: 'label',
    ykeys: ['inbound_netto', 'inbound_brutto', 'outbound_netto', 'outbound_brutto'],
    labels: ['Inbound Netto', 'Inbound Brutto', 'Outbound Netto', 'Outbound Brutto'],
    resize: true,
    barColors: ["#B21516", "#1531B2", "#1AB244", "#B29215"],
    hideHover: true
});

Thank you.

Share Improve this question edited Nov 6, 2015 at 13:35 TayTay 7,1905 gold badges46 silver badges69 bronze badges asked Nov 6, 2015 at 13:26 TadejTadej 111 silver badge3 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 3

I don't think it's possible with the latest Morris.js version (0.5.1).
You can set the stacked parameter to true in your Morris.Bar configuration, but for only one stacked bar for each label:

stacked: true

Morris charts samples

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745591815a4634879.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信