Skip to content

Mobile usability of graph legends #3136

@CAYdenberg

Description

@CAYdenberg

Description

Clicking on items in some graph legends tends to select or deselect the data set represented by that item. However, this behaviour doesn't translate well to touch devices, where the graph state tends to get confused and register both hover and click events on every tap.

Expected behaviour

If a legend item is selected, then tapping it should deselect it. If a legend item is not selected, then tapping it should select it.

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to https://ourworldindata.org/grapher/co2-emissions-vs-gdp on a touch screen device
  2. Tap Europe in the legend
  3. Tap North America in the legend. Both are now selected.
  4. Tap Europe again. Nothing changes.
  5. Tap Asia. Europe is now deselected.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

For smartphone, instead provide:

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions