-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Tooltip bbox position is incorrect when inside a dcc.Loading component #3015
Comments
Hi @TenteEEEE Thanks for the great write-up and the sample app! 🏆 I was able to reproduce the issue. I would have expected to see this issue in 2.17.0 as well, because the dcc.Tooltip should be included as child of the dcc.Loading component. This worked as expected in the current version of Dash. I'm not sure if this should be consider a bug. dcc.Loading(
id="loading",
type="default",
delay_show=1000,
children=[
dcc.Graph(
id="graph-with-loading",
figure=px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16]),
),
dcc.Tooltip(id="tooltip-with-loading"),
],
), Update - it should probably work both ways, so the above might just be considered a workaround. |
Thank you for your response! I sincerely appreciate your guidance on the appropriate workaround. dcc.Loading(
id="loading",
type="default",
children=[
dcc.Graph(
id="graph-with-loading",
figure=px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16]),
),
dcc.Tooltip(
id="tooltip-with-loading",
),
],
target_components={"graph-with-loading": "children"},
), Is this correct? My personal issue has been completely resolved with the above solution, so I now understand that this issue is not a bug but a specification. Once again, thank you for your support! |
First of all, I want to express my appreciation for this excellent product.
Context
I have a graph that takes a long time to render, and I want to display a loading indicator before it renders.
Bug
When the graph is nested inside a dcc.Loading component, the tooltip's bbox position is misaligned with the plot when displayed.
From my investigation, in Dash 2.17.0, the tooltip's bbox position is correct regardless of whether it's nested inside a loading component.
However, starting from Dash 2.17.1, the tooltip's bbox position becomes incorrect when nested.
Expected behavior
The tooltip's bbox position should be correct regardless of whether the graph is nested inside a dcc.Loading component.
Screenshots
Here I show the tooltip's bbox position problem using my minimal reproduction example.
Dash 2.17.0
Dash 2.17.1
Dash 2.18.1
Minimal Reproduction Example
poetry.lock
main.py
The text was updated successfully, but these errors were encountered: