Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

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

Description

@zadamg

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",
            )
        ],
    )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions