We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In a stacked bar chart if the first series is negative the second one start at the absolute value of the first.
Here is a jsbin example : http://jsbin.com/rapasomeyi/1/edit?html,js,output
The Morris js code is : Morris.Bar({ element: 'bar-example1', data: [ { y: '2006', a: -100, b: 90 }, { y: '2007', a: -75, b: 65 }, { y: '2008', a: -50, b: 40 }, { y: '2009', a: -75, b: 65 }, { y: '2010', a: -50, b: 40 }, { y: '2011', a: 75, b: 65 }, { y: '2012', a: 100, b: 90 } ], xkey: 'y', ykeys: ['a', 'b'], labels: ['Series A0', 'Series B0'], stacked: true }); Morris.Bar({ element: 'bar-example2', data: [ { y: '2006', a: 100, b: -90 }, { y: '2007', a: 75, b: -55 }, { y: '2008', a: 50, b: -45 }, { y: '2009', a: 75, b: -6 }, { y: '2010', a: 50, b: -20 }, { y: '2011', a: 75, b: -95 }, { y: '2012', a: 10, b: -90 } ], xkey: 'y', ykeys: ['a', 'b'], labels: ['Series A1', 'Series B1'], stacked: true });
The text was updated successfully, but these errors were encountered:
Find #533 that seems to be a solution.
Sorry, something went wrong.
No branches or pull requests
In a stacked bar chart if the first series is negative the second one start at the absolute value of the first.
Here is a jsbin example :
http://jsbin.com/rapasomeyi/1/edit?html,js,output
The Morris js code is :
Morris.Bar({
element: 'bar-example1',
data: [
{ y: '2006', a: -100, b: 90 },
{ y: '2007', a: -75, b: 65 },
{ y: '2008', a: -50, b: 40 },
{ y: '2009', a: -75, b: 65 },
{ y: '2010', a: -50, b: 40 },
{ y: '2011', a: 75, b: 65 },
{ y: '2012', a: 100, b: 90 }
],
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['Series A0', 'Series B0'],
stacked: true
});
Morris.Bar({
element: 'bar-example2',
data: [
{ y: '2006', a: 100, b: -90 },
{ y: '2007', a: 75, b: -55 },
{ y: '2008', a: 50, b: -45 },
{ y: '2009', a: 75, b: -6 },
{ y: '2010', a: 50, b: -20 },
{ y: '2011', a: 75, b: -95 },
{ y: '2012', a: 10, b: -90 }
],
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['Series A1', 'Series B1'],
stacked: true
});
The text was updated successfully, but these errors were encountered: