admin管理员组文章数量:1022982
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 badges1 Answer
Reset to default 3I 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
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 badges1 Answer
Reset to default 3I 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
本文标签: javascriptmorrisjs Multiple stacked bars on single labelStack Overflow
版权声明:本文标题:javascript - morris.js Multiple stacked bars on single label - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745591813a2157934.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论