Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

hovertext re-appears after "playing" an animation #1001

Open
zadamg opened this issue Oct 4, 2022 · 0 comments
Open

hovertext re-appears after "playing" an animation #1001

zadamg opened this issue Oct 4, 2022 · 0 comments

Comments

@zadamg
Copy link

zadamg commented Oct 4, 2022

Simple as the title.. no callback is firing to update; it's just the in-line Express animator. Just make a px.Scatter with an animation_group and slider, then update the layout before rendering:

fig.update_traces(hoverinfo="none", hovertemplate=None, hovertext=None)

Then play the animation and hover over a point and the hovertext has reappeared. Expected behavior would be to stay hidden, as there's nothing asking hovertext to be re-enabled after explicitly updating all traces not to have one.

Here's the behavior:
https://i.postimg.cc/8CL7VtV1/issue-plotly.gif

Here's the slider/button I created. Sadly, I don't have a minimally re-producable example, but it should be easy enough to recreate.

fig.update_layout(
        sliders=[
            dict(
                currentvalue=dict(
                    prefix="Date: ",
                    visible=True,
                ),
                transition={"duration": 800, "easing": "cubic-in-out"},
                len=0.98,
                x=0.02,
                y=0,
                steps=[],
            )
        ],
        updatemenus=[
            dict(
                type="buttons",
                direction="down",
                buttons=list(
                    [
                        dict(
                            args=[
                                None,
                                {
                                    "frame": {"duration": 1400, "redraw": False},
                                    "fromcurrent": True,
                                    "transition": {
                                        "duration": 1400,
                                        "easing": "cubic-in-out",
                                    },
                                },
                            ],
                            label="Play",
                            method="animate",
                        ),
                        dict(
                            args=[
                                [None],
                                {
                                    "frame": {"duration": 0, "redraw": False},
                                    "mode": "immediate",
                                    "transition": {"duration": 0},
                                },
                            ],
                            label="Pause",
                            method="animate",
                        ),
                    ]
                ),
                showactive=False,
                x=-0.1,
                xanchor="left",
                y=-0.4,
                yanchor="bottom",
            )
        ],
    )
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant