-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Box points hover & select #2094
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
cfc8725
lint (mostly var\n , -> var\n var blocks)
etpinard 53c446b
revamp Box.calc and Box.plot handling of boxpoints
etpinard 581f3fa
add lasso/select dragmode support to box traces
etpinard e59f283
flatten box test suite
etpinard 5c58049
add some box hover tests
etpinard aef61ae
introduce box 'hoveron'
etpinard d352fa5
add 'text' attribute to box traces
etpinard 6a878b0
more linting in Box.plot
etpinard 0027b84
Merge branch 'master' into boxpoints-hover-select
etpinard a1ea1e8
fixup box hoveron description
etpinard 6bfcbe0
make 'boxes+points' the box hoveron dflt
etpinard 9ca410a
improve `boxpoints: false` default logic
etpinard 7e44c9c
add `boxmode: 'overlay'` hover test case
etpinard f228a5e
aj-proof box hover logic
etpinard b4d8044
hide modebar select2d & lasso2d buttons for boxes w/o 'all' boxpoints
etpinard 9e69900
rm useless 'c' value in scattercarper point event data
etpinard 8901528
report coords in input-data space in pt event data
etpinard b66628e
introduce Axes.hoverLabelText
etpinard a3ec75a
add prefix box stats hover labels
etpinard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This here was the key to make box point hover and selection somewhat clean.
Box calcdata traces have one item per box to be displayed. Box points data-esque array of objects used to be created during
Box.plot
, now the structure is setup here. Note that it is important to track the original sample pt index (thati
above) to convert hovered are selected calcdata items to event datapointNumber
corresponding to indices in the inputx
/y
sample arraysThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... probably best to review this file as a whole:
https://github.com/plotly/plotly.js/blob/6a878b0eef3e52332bd84eca40d024eec1219264/src/traces/box/calc.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely nice and clean - I was curious whether this degraded performance for large data sets, but it looks like very little if at all
On my computer 1 million points (of which ~5k are outliers) takes ~3 sec, and difference between this branch and master is within the noise (~10% or less)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a look at this 🐎