Skip to content
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

Heatmap suppress hovers on missing data #4226

Closed
nicolaskruchten opened this issue Sep 26, 2019 · 9 comments · Fixed by #4291
Closed

Heatmap suppress hovers on missing data #4226

nicolaskruchten opened this issue Sep 26, 2019 · 9 comments · Fixed by #4291
Assignees
Labels
feature something new
Milestone

Comments

@nicolaskruchten
Copy link
Contributor

A trace-by-trace flag to disable hovers on heatmaps when the z value is null/NaN

@emmanuelle
Copy link
Contributor

image
we want the possibility to remove this hover on null/NaN regions

@etpinard etpinard added the feature something new label Sep 26, 2019
@nicolaskruchten nicolaskruchten added this to the v1.51.0 milestone Oct 3, 2019
@etpinard
Copy link
Contributor

etpinard commented Oct 4, 2019

We'll need a new attribute for this - exposed in all 2d-z trace types (heatmap, contour, contourcarpet, histogram2d*, surface).

Anyone want to take a shot at naming this new attribute? e.g. hovernanvalue or hovernan?


In relation to #3035 and #975, maybe this new attribute could be a valType: 'string'. For example,

hovernan: 'blank'
// would show `z: blank` in the hover label

hovernan: ''
// or maybe handle
hovernan: null 
// to omit the `z: ` line in the hover label.

Moveover, should this new attribute only affect hover labels generated via hoverinfo or should it also affect the %{z} values in hovertemplate strings. For example,

// should
hovernan: '',
hovertemplate: 'f(%{x},%{y}) = %{z}'

// show: `f(1,1) = NaN`
// OR: `f(1,1) = ''` ?

@etpinard
Copy link
Contributor

etpinard commented Oct 4, 2019

Or wait, looks like this ticket actually wants to suppress the entire hover label (not just the z: line) when hovering over a NaN z value.

Perhaps, in this case a boolean makes more sense: For example: hoveronnan, but maybe that's a little too hard to make up in smashtogethercase.

@archmoj
Copy link
Contributor

archmoj commented Oct 11, 2019

What about hovermissing?

@archmoj archmoj self-assigned this Oct 11, 2019
@archmoj
Copy link
Contributor

archmoj commented Oct 11, 2019

Or hoverignore?

@nicolaskruchten
Copy link
Contributor Author

can we reuse hoveron ?

@nicolaskruchten
Copy link
Contributor Author

like hoveron = "all" | "nonnan"

@archmoj
Copy link
Contributor

archmoj commented Oct 11, 2019

I like it. And I see hoveron is used at least with box, parcats, scatter, scattergl, scattercarpet, scatterternary and violin.
Is there any conflict with the traces mentioned in #4226 (comment)?

@archmoj
Copy link
Contributor

archmoj commented Oct 18, 2019

@emmanuelle would you mind testing the hover behaviour on missing points using this codepen?

Updated the demo link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants