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.
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
implement hoverinfo 'none' and 'skip' in sankey #3096
implement hoverinfo 'none' and 'skip' in sankey #3096
Changes from 7 commits
69c11fe
880973a
d247b8b
1919b72
e942bc5
1813d6c
9e4f1a0
706e7ae
7c24d29
53d7ce3
87c30fe
7a32036
b436003
fe7ab49
644c4e3
ccaef04
dc8ba12
ea73c64
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Oh so, trace-level
hoverinfo
is no longer available for sankey traces? Luckily it never worked so this isn't breaking change.Does this PR close #3097 ?
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.
It wouldn't close it.
Issue #3097 is about supporting
hoverinfo
options other than the basicskip
andnone
. Although the current doc say that we support many:none actually worked except
all
. This PR is solely about adding support forskip
andnone
. Those two are arguably more urgent to support (ie. whether to hide the hoverlabels and whether to emit hover events at the same time).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.
Good to know. 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.
But wait, trace
hoverlabel
was working before this. Hmm, I'd call this a breaking change.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.
... I think we should either make node/link
hoverlabel
inherit from tracehoverlabel
or add somecleanData
logic.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.
@etpinard It's great that you noticed that change and I agree this should be handled better!
FYI, having a
hover(label|info)
in eachnode
andlink
was the fruit of discussions with @alexcjohnson. In the future, we could add ahovertemplate
on each to provide control over their content. That's one way of dealing with point 2 of this comment #3126 (comment) which we can discuss about later on :)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.
Ah indeed - good catch @etpinard - I'd go for:
That would be more friendly for the (probably most common) case that users want node and link hover labels styled the same.
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.
... and maybe we should have a trace
hoverinfo
that acts similarly.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.
hoverinfo
is trickier - could be nice to inheritskip
/none
, but when we get around to supporting a real flaglist, links and nodes will have completely different options.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.
e.g.
trace.hoverinfo: 'none'
would be equivalent tonode.hoverinfo: 'none'
+link.hoverinfo: 'none'
.Not all the flags to be implemented in #3097 should be available from the trace hoverinfo, but I think setting trace-wide
'none'
and'skip'
could be useful.