Skip to content

Get click coordinate after a click with touch device #6721

Closed
@josephernest

Description

@josephernest

Let's say we have the select tool active on a heatmap. Live demo here, see the JS console.

We successfully get the coordinates:

  • when drag-and-drop: plotly_selected event => we have the coordinates in event.selections
  • when click: plotly_click event => we have the coordinates in event.points

When using a touchscreen, we also successfully get the coordinates when drag-and-drop: the plotly_selected event is fired and we have the coordinates in event.selections. But when clicking (=tap), we only get:

  • plotly_selected undefined, and no coordinate.

Question: I know that Plotly.js touch support is limited for now, but is there a way to get plotly_click event when we do a tap on a heatmap (with select tool), and have the coordinates in event.points?

PS: Even if I used an event listener with touch events (such as touchstart, touchend), I wouldn't get the coordinates in Plotly plot coordinate system.

@lvlte Maybe you have an idea? (I know you have experience in these topics!)

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