Skip to content

Axis formatting not carrying over to hover text in shared axes #2740

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

Open
corentinllorca opened this issue Sep 1, 2020 · 1 comment
Open
Labels
bug something broken P3 backlog

Comments

@corentinllorca
Copy link

corentinllorca commented Sep 1, 2020

The code below produces subplots with shared Y axes (on the top row), then attempts to apply y axis formatting to display values in percentages. However, when hovering over the data points in the top right plot, I'm still seeing the default format instead of percentages. Wondering if that's intended, as I feel like the default behavior should be to apply the formatting to all the subplots with that shared axis.

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

fig = make_subplots(rows=2, cols=2,
                        specs=[[{}, {}],
                               [{"colspan": 2}, None]],
                        subplot_titles=("1", "2", "3"),
                        shared_yaxes=True,
                        horizontal_spacing=0.01,
                        vertical_spacing=0.15)

fig.add_trace(go.Scatter(x=[1,2], y=[0,1]),
                      row=1, col=1)

fig.add_trace(go.Scatter(x=[1,2], y=[0,1]),
                      row=2, col=1)

fig.add_trace(go.Scatter(x=[1,2], y=[0,1]),
                      row=1, col=2)

fig.update_yaxes(tickformat=',.1%')
@panizoeva
Copy link

Same issue here!

@gvwilson gvwilson self-assigned this Jul 3, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added P3 backlog bug something broken labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

3 participants