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

Show only exact x matches in hover with hovermode="x unified" #4717

Open
tlauli opened this issue Aug 14, 2024 · 0 comments
Open

Show only exact x matches in hover with hovermode="x unified" #4717

tlauli opened this issue Aug 14, 2024 · 0 comments
Labels
feature something new P3 backlog

Comments

@tlauli
Copy link

tlauli commented Aug 14, 2024

Currently, if there are two traces a, b with hovermode="x unified", then a value from trace b can be shown in the hoverinfo even when I am hovering on a x coordinate where there is no point in trace b, but only in trace a, see picture, where hovering over point from trace a with x=3 shows point from trace b with x=3.05.
I would like a way to enforce that only points with exactly matching x coordinates are shown in the hover (something like hovermode="x unified exact"?).

image

Code to generate figure from the screenshot:

fig = go.Figure(
    layout=go.Layout(hovermode="x unified"),
    data=[
        go.Scatter(
            x=[1, 3],
            y=[1, 1],
            name="a",
        ),
        go.Scatter(
            x=[1, 3.05],
            y=[2, 2],
            name="b",
        ),
    ],
)
@gvwilson gvwilson added feature something new P3 backlog labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P3 backlog
Projects
None yet
Development

No branches or pull requests

2 participants