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

Hoversubplots=axis not working with make_subplots #4603

Open
Coding-with-Adam opened this issue May 6, 2024 · 13 comments
Open

Hoversubplots=axis not working with make_subplots #4603

Coding-with-Adam opened this issue May 6, 2024 · 13 comments
Labels
bug something broken P3 backlog sev-3 annoyance with workaround

Comments

@Coding-with-Adam
Copy link
Contributor

Initially reported on the Plotly forum.

Using make_subplots means that the hoversubplots=“axis” will not work correctly.

Sample code that produces the error:
Codepen.

import plotly.graph_objects as go
from plotly import data
from plotly.subplots import make_subplots

df = data.stocks()


fig = make_subplots(rows=3, cols=1, shared_xaxes=True, vertical_spacing=0.03)
layout = dict(
    hoversubplots="axis",
    title="Stock Price Changes",
    hovermode="x",
    grid=dict(rows=3, columns=1),
)

fig.add_trace(go.Scatter(x=df["date"], y=df["AAPL"], name="Apple"), row=1, col=1)
fig.add_trace(go.Scatter(x=df["date"], y=df["GOOG"], name="Google"), row=2, col=1)
fig.add_trace(go.Scatter(x=df["date"], y=df["AMZN"], name="Amazon"), row=3, col=1)
fig.update_layout(layout)
fig.show()

bdc0bda148a0bc897f35bde5ac36eda09b53f731_2_1035x496

Expected behavior should be the same as when using the Plotly docs hover on subplots example, where hover labels appear for all charts:
Codepen.
image

@Coding-with-Adam Coding-with-Adam added bug something broken sev-3 annoyance with workaround labels May 6, 2024
@Episkiliski
Copy link

Episkiliski commented May 28, 2024

When will this be addressed?

@luweiming
Copy link

I have the same issues even with the latest Plotly 5.23.0

@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added the P3 backlog label Aug 12, 2024
@n-splv
Copy link

n-splv commented Aug 19, 2024

+1
Many folks prefer not to work with the 'go' API because it's less intuitive. A fix for make_subplots would be appreciated 🙏

@verdverm
Copy link

+1
hitting the same issue, one cannot add multiple traces to a subplot and have the hoversubplots work at the same time

@matthiasschuurmans
Copy link

+1, though I found https://community.plotly.com/t/hover-question-how-to-info-in-all-trace/84893/2 as well, which seems to indicate it's not a bug because (if I understand correctly) make_subplots(shared_xaxes=True) doesn't actually create a single x-axis?

"REMEMBER that setting shared_xaxes=True does not assign the same name to xaxis in all subplots."

@shifenhutu
Copy link

I have the same issues even with the latest Plotly 5.24.1

@alsonpr
Copy link

alsonpr commented Oct 29, 2024

Facing the same issue, hope this will get resolved soon

@joel23888
Copy link

joel23888 commented Nov 2, 2024

I am facing the same issue.

@1SoSi1
Copy link

1SoSi1 commented Nov 21, 2024

having the same issue here, hoping this will get resolved soon

@ShootingStarD
Copy link

Same issue

@paoloalba
Copy link

+1

@eetulauri
Copy link

Any timeline when this would be addressed?

@gvwilson
Copy link
Contributor

Not at present unfortunately - our major release should be out soon, and then we will start looking at backlog again. If someone is able to put together a PR for us to review, that will certainly accelerate things. Thanks - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog sev-3 annoyance with workaround
Projects
None yet
Development

No branches or pull requests