question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
empetcommented, Jan 31, 2020

Thanks @archmoj!

0reactions
archmojcommented, Jan 31, 2020

@empet thank you for reporting!

Read more comments on GitHub >

github_iconTop Results From Across the Web

plotly.graph_objects.Mesh3d — 5.11.0 documentation
hoverinfo – Determines which trace information appear on hover. ... intensity – Sets the intensity values for vertices or cells as defined by...
Read more >
Python Figure Reference: mesh3d Traces - Plotly
Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is...
Read more >
PlotlyWidget.add_mesh3d
If none or skip are set, no information is displayed upon hovering. But, if none is set, click and hover events are still...
Read more >
Chart::Plotly::Trace::Mesh3d - MetaCPAN
Sets the source reference on Chart Studio Cloud for `hoverinfo`. hoverlabel. hovertemplate. Template string used for rendering the information that appear on ...
Read more >
plotly.graph_objs - Anvil Docs
To be seen, trace `hoverinfo` must contain a *text* flag. hovertemplate - Template string used for rendering the information that appear on hover...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found