Skip to content
New issue

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

Stacked bar with negative value can float in the air according to series order #579

Open
eternel7 opened this issue Apr 25, 2015 · 1 comment

Comments

@eternel7
Copy link

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
});

@eternel7
Copy link
Author

Find #533 that seems to be a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant