Skip to content

[BUG] hoveranywhere and clickanwhere do not trigger dash callbacks #3851

Description

@AnnMarieW

The clickanywhere and hoveranywere is a cool new feature in Plotly 6.7, but it does't actually trigger a dash callback because the xvals and yvals are not included in the dcc.Graph clickData and hoverData props.

https://plotly.com/python/hover-text-and-formatting/

Emitting Hover and Click Events Anywhere in the Plot Area
New in 6.7

By default, hover and click events are only emitted when the cursor is over a trace. Set hoveranywhere or clickanywhere to True to emit these events anywhere inside the plot area, including over empty space: fig.update_layout(hoveranywhere=True, clickanywhere=True). The events carry the cursor's data coordinates, which is useful when building interactive callbacks (for example, in Dash) that need to respond to clicks on locations that don't correspond to a specific data point.


I'll create a PR to fix this

Activity

  1. self-assigned this
    on Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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