feat: sort values in actions by closest to cursor#1023
Merged
nickofthyme merged 3 commits intoelastic:masterfrom Feb 11, 2021
Merged
feat: sort values in actions by closest to cursor#1023nickofthyme merged 3 commits intoelastic:masterfrom
nickofthyme merged 3 commits intoelastic:masterfrom
Conversation
markov00
approved these changes
Feb 11, 2021
Collaborator
markov00
left a comment
There was a problem hiding this comment.
Tested locally and works fine when pushing out events on click/over.
Can you describe what is the current use case for that sorting?
Collaborator
Author
|
@markov00 for now, the only use case is in |
github-actions bot
pushed a commit
that referenced
this pull request
Feb 15, 2021
# [24.6.0](v24.5.1...v24.6.0) (2021-02-15) ### Bug Fixes * **legend:** width with scroll bar ([#1019](#1019)) ([45bd0d5](45bd0d5)) ### Features * sort values in actions by closest to cursor ([#1023](#1023)) ([e1da4e5](e1da4e5)) * **axis:** small multiples axis improvements ([#1004](#1004)) ([514466f](514466f)) * **partition:** drilldown ([#995](#995)) ([20bbdae](20bbdae))
Collaborator
|
🎉 This PR is included in version 24.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
AMoo-Miki
pushed a commit
to AMoo-Miki/OpenSearch-Dashboards
that referenced
this pull request
Feb 10, 2022
# [24.6.0](elastic/elastic-charts@v24.5.1...v24.6.0) (2021-02-15) ### Bug Fixes * **legend:** width with scroll bar ([opensearch-project#1019](elastic/elastic-charts#1019)) ([3f9c858](elastic/elastic-charts@3f9c858)) ### Features * sort values in actions by closest to cursor ([opensearch-project#1023](elastic/elastic-charts#1023)) ([4f99c63](elastic/elastic-charts@4f99c63)) * **axis:** small multiples axis improvements ([opensearch-project#1004](elastic/elastic-charts#1004)) ([5896cfa](elastic/elastic-charts@5896cfa)) * **partition:** drilldown ([opensearch-project#995](elastic/elastic-charts#995)) ([de0cba6](elastic/elastic-charts@de0cba6))
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.
Summary
closes #835
Sorts values when finding indexed geometries by closest to cursor
Point. This is determined by the spatial distance between the index points and the cursor point. Will only compare across different x values in spatially indexed charts (i.e. bubble).Example
Clicking near the yellow arrow will now return the values in the array as
7.0then6.8because the cursor is closest to7.0Clicking near the pink arrow will now return the values in the array as
6.8then7.0because the cursor is closest to6.8This will also be performed on spatial maps with bubble charts and will use the closest distance, including across different x values.
Checklist
src/index.ts(and stories only import from../srcexcept for test data & storybook)