[Canvas] Fix bug with plot sorting#98084
Merged
crob611 merged 1 commit intoelastic:masterfrom Apr 23, 2021
Merged
Conversation
Contributor
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Apr 23, 2021
This was referenced Apr 23, 2021
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Apr 23, 2021
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Apr 23, 2021
Contributor
kibanamachine
added a commit
that referenced
this pull request
Apr 23, 2021
kibanamachine
added a commit
that referenced
this pull request
Apr 23, 2021
kibanamachine
added a commit
that referenced
this pull request
Apr 23, 2021
|
I changed the v7.12.1 label to 7.12.2. I don't think the backport to 7.12 branch made it into the 7.12.1 release build. This is the release commit for 7.12.1 https://github.com/elastic/kibana/commits/abb04c5543d2201630c9669fe3680864506d924e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #62770
Summary
In our
plotfunction, we are taking in the input and doing asortBy(input.rows, ['x', 'y', 'color', 'size', 'text'])In Lodash 3.10, the
sortBymethod does not accept an array of properties to sort by as a second argument. That should have been done bysortByAll. 3.10 handles it, and does not sort the array.Lodash 4 brought the functionality of
sortByAllinto thesortByfunction, so where this line previously was a no-op, after the upgrade to 4 it started to always sort a plot by x,y,color,size,textTo fix this, I'm taking out the
sortByin the plot (and in the tick finding method as well) since when everything was working as it should, those were actually noops. This will allow the user to sort however they want and pass that into plot and have everything be sorted as expected.