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.

Hovertemplate display of X value of points in hoverset that differ from that of the winning point

See original GitHub issue

Right now, in compare and unified hover modes, it’s possible for points to be in the hover set and still have slightly different X values from that of the point that won the hover, and in this case we show the differing X value in parentheses in the hoverlabel.

We need to be able to show this value when hovertemplate is active as well, possibly via some new hovertemplate %{value} that is empty if the X value matches that of the winning point, and contains “(%{x})” otherwise.

This should honor the new (x|y)hoverformat attributes too.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolaskruchtencommented, May 28, 2021

Basically the use case is this: https://codepen.io/nicolaskruchten/pen/MWpEQqZ?editors=0010 … on line 15 we want to be able to add %{xother} or something so that the Q1 will appear in the unified hoverlabel.

0reactions
nicolaskruchtencommented, May 28, 2021

The use case is when you have, say, quarterly bars and monthly scatters AND you’re using hovertemplate and unified hover. Right now when you hover on a scatter point, you don’t get the indication about the X-coordinate of the bar. If you don’t use hovertemplate you do, so we need to add this capability to hovertemplate.

I think that using (x, y) is quite conventional and I don’t think we should change it in v2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hover text and formatting in Python - Plotly
If layout.hovermode='x unified' (or 'y unified' ), a single hover label appear, describing one point per trace, for points at the same x...
Read more >
hovertemplate does not show value · Issue #1859 · plotly ...
The following code produces a plot where, when I hover over the middle point, gives me this hover text: Price: $6.84 X: 3...
Read more >
Why is hovertemplate not showing up correctly for some data ...
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 >
Introduction to Hovertemplate in Plotly Graphs - Medium
In this paper, we'll try to point out what hovertemplate is in Plotly, how we can use it, and how we can add...
Read more >
hovertemplate in HeatMap - Mendix Forum
Hi Experts, Regarding HeatMap MouseOver (tooltip): HeatMap shows value of x,y and z on mouse over by default, Also additionally it shows ...
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