-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Custom trace hover labels #1582
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
43 commits
Select commit
Hold shift + click to select a range
83cd8c8
add hoverlabel attribute container for all traces
etpinard 258f1c7
merge hoverlabel items in scatter and bar calcdata
etpinard fe50b6f
add hover label setting to hoverData during `cleanPoint`
etpinard 8d7ec16
Merge branch 'master' into hoverlabel-custom
etpinard ffde987
break up cartesian graph_interact.js:
etpinard 1d4930c
update Fx require statements
etpinard e609955
update hover constant require statements
etpinard 12954aa
sub Fx.init by (cartesian) initIterations
etpinard 27fb2d0
decrease max allowed circular deps to 13 :tada:
etpinard a96af57
mv fx attribute out of plots/ and into components/fx/
etpinard abcf1b0
register fx in core.js
etpinard 03554a5
Merge pull request #1613 from plotly/fx-component
etpinard efcb027
revert hoverlabel in arraysToCalcdata -> add Fx.calc
etpinard 7907140
make fx default test more robust
etpinard 0d66e6e
lint fx constants
etpinard 3ac4c07
lint getComponentMethod call
etpinard 295659e
add fx supplyDefaults method
etpinard 9d91e2c
fix mapbox hover label color for array `marker.color` values
etpinard add85d2
lint var declarations
etpinard f986fd2
add global layout defaults step for `layout.hoverlabel`
etpinard a8cc8b0
make common label in 'x' and 'y' hovermode adhere to layout.hoverlabel
etpinard 9ee8877
add tests for custom hover labels cartesian, geo, mapbox & ternary
etpinard 4ec88ef
add support for per-point `hoverlabel` setting in 2d z traces
etpinard b053629
add support for per-pt `hoverlabel` setting in pie traces
etpinard 92de017
put selection coords (not hoverlabel strings) to event data
etpinard 7332d23
set `selection.index` during gl3d trace handlePick
etpinard 6bbfa65
add support for custom hover label in gl3d
etpinard 28c2770
add support for custom hover label in gl2d
etpinard cda735b
make hoverlabel text selection query more robust
etpinard ce27e10
bump back max allowed circular deps to 17
etpinard be9e6b9
resolves #1575 - call Fx.hover with evt object containing 'xpx' & 'ypx'
etpinard cf61dc2
fixes #1600 - allow z cartesian traces to have a name hover label
etpinard 9eeadcf
don't override hover label data by undefined vals
etpinard 8321959
make sure arrayOk resyle logic works for hoverlabel attributes
etpinard 409b771
Merge pull request #1627 from plotly/hover-misc-bugs
etpinard 60bd4fc
factor out gl2d / gl3d cast hover options logic into 1 Fx method
etpinard e45bff9
perf improvements in fx helpers
etpinard e0be6cd
Merge branch 'master' into hoverlabel-custom
etpinard 8d021e0
:hocho: :evergreen_tree: in sankey tests
etpinard 4d3ce92
implement 'hoverlabel' settings in sankey hover routines
etpinard e50886c
fixup: don't support array value in sankey hoverlabel settings
etpinard f8258cb
add sankey hover label style tests
etpinard 3f52a89
Merge branch 'master' into hoverlabel-custom
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
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.
@monfera does this look ok to you? I'm looking for the data array index corresponding to this link / node (below).
Oh wait.
node
andlink
can have different lengths, correct? So maybehoverlabel
should be set per-node and per-link e.g.:Well the above sounds uselessly complicated for v1 of sankey. So, I'd vote for not allowing array values in
hoverlabel
attribute of sankey traces. Does that sound ok?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.
Yes your conclusion sounds good to me. Indeed it'll be an unlikely occurrence that the number of nodes and links match.
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.
✅ in e50886c
🔒 in f8258cb
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.
We can leave it off for now to get 1.27 out, but we should definitely include custom hovertext (and at that point we might as well include custom styling) for both nodes and links in the near future - I can definitely see people wanting to explain what specifically is included in each of these elements in more detail than is displayed permanently on the diagram. Chatting with @monfera seems like
link.label
fills this role for links but there's no analog for nodes. I'll make an issue for this so we don't forget about it.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!
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.
#1663