Add hoverongaps to heatmap and contour for suppressing hovers on missing data#4291
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.
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.
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
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
hovergapsis added tocontourandheatmapfor disabling hover when thezis missing.@plotly/plotly_js