Skip to content

Hovering for points on non-overlaying y-axes for same x-value (and same plot) #290

@Abildtoft

Description

@Abildtoft

Hi,

For a medical app, I have created a plot wherein i stack 4 y-axes (e.g., 'yaxis' has domain [0.00, 0.24], 'yaxis2' has [0.25, 0.48], ...), while they all share the same date x-axis. My reason for stacking them instead of overlaying them is not only that they each represent quite disparate ranges (each with their own unit), but also have quite different 'sub-ranges' (e.g., what range constitutes an 'acceptable' value).

Stacking instead of overlaying, however, breaks the 'x'-hovermode insofar as it limits itself to only look for points with the same x-value as the 'originally hovered'-point within overlaying subplots. When I tried to write my own "plotly_hover" event handler, I realized that Plotly.Fx.hover does not allow for the specification of a subplot per point (in the array one can supply in the 'evt' variable), but can only be specified generically for all points with the 'subplot' variable.

Am I missing a workaround that still allows me to use your awesome built-in hover functionality without attempting to rewrite it myself, or dropping it in favor of the dirtiness of dynamically adding and removing annotations?

In any case, thanks for an awesome library.

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