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

Mesh3d: false information displayed on hover when hovertemplate gives cell intensities or facecolor #4527

Closed
empet opened this issue Jan 29, 2020 · 5 comments · Fixed by #4539
Assignees
Labels
bug something broken

Comments

@empet
Copy link

empet commented Jan 29, 2020

When intensitymode='cell' and the hovertemplate is defined like this:

hovertemplate = "cell intensity": %{intensity: .3f}"

or if I define as customdata the array of face center coordinates
and a hovertemplate of the form:

hovertemplate ="fx: %{customdata[0]:.3f}<br>fy: %{customdata[1]:.3f}"+\ "<br>fz: %{customdata[2]:.3f}<br>intensity: %{intensity:.3f}<extra></extra>"

the hoverbox that displays data related to the kth face is anchored at the kth vertex, i.e. plotly.js associates face attributes to vertices and so hovering is confusing and non-informative.

It would be nice to provide hoverbox pointing to the face centers when a hovertemplate contains information related to faces.

This is a simplest example to illustrate the bug: https://plot.ly/~empet/15474. It has 6 vertices and 8 faces. Plotly makes pairs (vertex[k], intensity_face[k]), k 0,1,2,...5. Hence the face intensity for the faces 6 and 7 are not even displayed.

In the right plot from this example https://plot.ly/~empet/15467 if you are hovering the darkest face, you'll see the non-concordance between the associated color and the displayed intensity.

@archmoj archmoj added the bug something broken label Jan 29, 2020
@archmoj archmoj self-assigned this Jan 29, 2020
@archmoj
Copy link
Contributor

archmoj commented Jan 29, 2020

@empet
Thanks very much for reporting.
It turned out that there is a similar bug when using facecolor!
Here is a demo.

@archmoj archmoj changed the title Mesh3d: false information displayed on hover when hovertemplate gives cell intensities Mesh3d: false information displayed on hover when hovertemplate gives cell intensities or facecolor Jan 29, 2020
@empet
Copy link
Author

empet commented Jan 29, 2020

@archmoj I don't remember ever using facecolor, because for a mesh with a big number o faces it's difficult to find and write explicitly so many color codes.

@archmoj
Copy link
Contributor

archmoj commented Jan 30, 2020

This issue might be linked to #4533.

@empet
Copy link
Author

empet commented Jan 31, 2020

Thanks @archmoj!

@archmoj
Copy link
Contributor

archmoj commented Jan 31, 2020

@empet thank you for reporting!

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

Successfully merging a pull request may close this issue.

2 participants