-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add hoverongaps to heatmap and contour for suppressing hovers on missing data #4291
Conversation
A few questions:
|
|
src/traces/heatmap/hover.js
Outdated
obj.zLabel = Axes.tickText(dummyAx, zVal, 'hover').text; | ||
} | ||
|
||
return [Lib.extendFlat(pointData, obj)]; |
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.
So this mean when hovergaps:false
, zLabel
and zLabelVal
remain undefined, but we still pass pointData
back to Fx.hover
?
Does this mean that the hover label is suppressed, but the plotly_hover
event is still getting triggered?
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.
Here is a codepen displaying the current behaviour with hoverongaps
disabled.
Please let me know if you prefer not to have hover effects at all.
cc: @emmanuelle
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.
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.
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.
Fantastic!!
What wait. What about -> https://codepen.io/etpinard/pen/LYYxRVO ? |
…verongaps is false - adjust new tests to make sure plotly_hover is not triggered on gaps when hoverongaps is false
|
Very nicely done @archmoj 💃 for me! |
Great feature! Thanks for implementing! |
Resolves #4226.
A new attribute titled
hovergaps
is added tocontour
andheatmap
for disabling hover when thez
is missing.@plotly/plotly_js