-
Notifications
You must be signed in to change notification settings - Fork 35
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
Broken "sort groups by..." for multiple sort criteria #161
Comments
so far when group sorting by a categorical value it actually sorts by two criteria: the name of the most frequent group, and second its count. lineupjs/src/model/internalCategorical.ts Lines 101 to 110 in 1019f08
e.g. in builder3.html first criteria level: Cat, 2nd. Cat2 values by group:
sorting asc it means: c1,c2 < c1,c1 since the group since of the first group sort criteria is smaller. |
Thanks for the explanation. What does most frequent group mean in this case? Is it the size (number of items) of a group? I think for the user it's very opaque what the group sorting criteria is. In my opinion we have the following options:
@sgratzl What do you think? |
After checking issue #109 it seems like these two issues are pretty similar. @sgratzl You posted already a screenshot #109 (comment) which matches my feature request in the previous comment. Maybe we move the discussion to issue #109 and continue there. I still owe you a comment there. 😃 |
In the end a simple compromise is to sort groups of categoricals by their most frequent category name only. Thus, in case it is used as a grouping criteria it behaves as expected when combined with another group sorting criteria |
Steps to reproduce
I could not provide a sandbox link, as a sorting bug was fixed with bafe482 (after v4.0.0-alpha.11) and no alpha.12 is available (yet).
npm start
and open http://localhost:8080/aggregate.htmlObserved behavior
Only the first group sorting is applied (in the example cat) and the second group sorting has no effect.
Expected behavior
The text was updated successfully, but these errors were encountered: