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.

Bug in displaying the text defined in hovertemplate for Surface

See original GitHub issue

A hovertemplate for Surface defined from customdata consisting in an array of shape (m, n, 3), and defined as follows:

hover = 'theta: %{customdata[0]:.3f}'+\
        '<br>phi: %{customdata[1]: .3f}'+\
        '<br>power: %{customdata[2]:.3f}<extra></extra>'

is displayed correctly only for the default position of the camera.eye. If you rotate the sphere the text is displayed verbatim like in the definition of hovertemplate:

https://chart-studio.plotly.com/~empet/15737

The Python code is posted on forum: https://community.plotly.com/t/surface3d-with-customdata/42708/3.

I

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
dcnicholscommented, Mar 17, 2021

I ran into this issue and noticed customdata swaps m and n when provided an array. I worked around this issue by swapping the axes of customdata compared to the rest of the surface.

2reactions
archmojcommented, Jul 21, 2020

I noticed the problem even on initial camera position.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize hover text in go.surface plot
Hi, I've struggled to create my own hover text for the go.surface plot ... be displayed, using hovertemplate , in the surface definition...
Read more >
Why is hovertemplate not showing up correctly for some ...
Here is your graph, with the hover template that you're looking for. The explanation follows. plot_ly(data = mydat2, x = ~score, y =...
Read more >
plotly Changelog
Display the version of plotly.js when hovering over the modebar ... Fix annotated heatmap text color when values are specified as a nested...
Read more >
plotly.js-dist
No longer show "Aa" text in legends unless there is only text in the legend item [#5682] · New defaults for legend. ·...
Read more >
CHANGELOG.md · res5692-no-longer-latest-cdn · mirrors / plotly ...
No longer show "Aa" text in legends unless there is only text in the legend ... Fix automargin bug for the case of...
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