Skip to content

multicategory sorting bugs #3356

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
alexcjohnson opened this issue Dec 20, 2018 · 0 comments · Fixed by #3362
Closed

multicategory sorting bugs #3356

alexcjohnson opened this issue Dec 20, 2018 · 0 comments · Fixed by #3362
Assignees
Labels
bug something broken

Comments

@alexcjohnson
Copy link
Collaborator

Based on a report by @nicolaskruchten

If you create multicategory data that aren't in order, there are different bugs whether the out-of-order values are within one trace or across multiple traces. See https://codepen.io/alexcjohnson/pen/vvgGOB?editors=0010

Across multiple traces (step 1): The combinations in the second trace are tacked on at the end, rather than inserted in the series after the existing values having the same outer category. Then when we're drawing labels, the outer categories are not contiguous, so the labels end up in a weird place. In this example, [4,2] is the 4th item and [4,1] is the 7th (with [5,1] and [6,2] between, from the first trace) so the 4 is drawn halfway between the 5th and 6th items... but that's on a divider between outer categories 5 and 6!
screen shot 2018-12-19 at 10 07 47 pm

Within one trace (step 2): The combinations are correctly sorted, BUT the x data are placed in their unsorted positions.
screen shot 2018-12-19 at 10 13 37 pm

@alexcjohnson alexcjohnson added the bug something broken label Dec 20, 2018
@etpinard etpinard self-assigned this Dec 20, 2018
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

Successfully merging a pull request may close this issue.

2 participants