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