Skip to content

Issue with fill in stackgroups #3003

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

Closed
dmt0 opened this issue Sep 12, 2018 · 2 comments
Closed

Issue with fill in stackgroups #3003

dmt0 opened this issue Sep 12, 2018 · 2 comments
Assignees
Labels
bug something broken

Comments

@dmt0
Copy link
Contributor

dmt0 commented Sep 12, 2018

fill: 'tonexty' (the default when you stack) fills to the other trace even though they’re in different stackgroups. Should fill the first of each stack to zero.

https://codepen.io/dmt0/pen/dqemWo?editors=0010 newPlot @ 0

@alexcjohnson alexcjohnson self-assigned this Sep 12, 2018
@alexcjohnson alexcjohnson added the bug something broken label Sep 12, 2018
@alexcjohnson
Copy link
Collaborator

Whew, I can make all sorts of fun stuff happen with multiple stackgroups... this example has them out of order in gd.data:
screen shot 2018-09-12 at 4 36 31 pm
But even if they're in the right order (ie all 'a' group together, then all 'b' group together, then all unstacked) there are still problems right now. Thanks for the report @dmt0!

@alexcjohnson
Copy link
Collaborator

Hmm, I think I need to actually reorder the traces internally so each stackgroup (and all groups of unstacked-but-filled-together traces) stays together. Otherwise you can get situations like this:
screen shot 2018-09-12 at 5 04 44 pm
Where all the fills have the right shape but the layering is ridiculous. You would never do this intentionally, but I can imagine it happening in the editor for example if you make a couple of stacks and then add a new item to an earlier stack. (If you leave the fills semi-transparent the situation is comprehensible... I just made them opaque to highlight the problem)

I first thought of bringing all unstacked traces to the front, but I think the better solution would be to push traces toward the back to join their groups, but otherwise stay in the same order. It would be weird, but I could imagine a user explicitly wanting a line to be drawn behind a stack. Or, perhaps more likely, wanting a single filled-to-zero trace drawn behind a stack.

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

No branches or pull requests

2 participants